Skip to content

Commit

Permalink
added review suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Vadym Struts <[email protected]>
  • Loading branch information
vadimstruts committed Jul 8, 2024
1 parent 02249fe commit 8dd42ab
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 15 deletions.
4 changes: 2 additions & 2 deletions components/brave_wallet/browser/brave_wallet_prefs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ constexpr char kBraveWalletUserAssetsAddIsSpamMigrated[] =
constexpr char kBraveWalletUserAssetsAddIsERC1155Migrated[] =
"brave.wallet.user.assets.add_is_erc1155_migrated";

// Deprecated 05/2024
// Deprecated 07/2024
constexpr char kPinnedNFTAssetsMigrated[] = "brave.wallet.user_pin_data";
// Deprecated 05/2024
// Deprecated 07/2024
constexpr char kAutoPinEnabledMigrated[] = "brave.wallet.auto_pin_enabled";

base::Value::Dict GetDefaultSelectedNetworks() {
Expand Down
4 changes: 0 additions & 4 deletions components/ipfs/ipfs_component_cleaner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ static const base::FilePath::StringPieceType kIpfsClientComponentId =
static const base::FilePath::StringPieceType kIpfsClientComponentId =
FILE_PATH_LITERAL("oecghfpdmkjlhnfpmmjegjacfimiafjp");
#endif
#else
// Not used yet for Android/iOS
static const base::FilePath::StringPieceType kIpfsClientComponentId =
FILE_PATH_LITERAL("");
#endif
} // namespace

Expand Down
1 change: 0 additions & 1 deletion components/ipfs/ipfs_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "brave/components/filecoin/rs/src/lib.rs.h"
#include "build/build_config.h"
#include "components/base32/base32.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "net/base/url_util.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ extension BrowserViewController: TopToolbarDelegate {
showWeb3ServiceInterstitialPage(service: service, originalURL: url)
case .load(let resolvedURL):
if resolvedURL.isIPFSScheme,
let resolvedIPRSURL = braveCore.ipfsAPI.resolveGatewayUrl(for: resolvedURL)
let resolvedIPFSURL = braveCore.ipfsAPI.resolveGatewayUrl(for: resolvedURL)
{
tabManager.selectedTab?.loadRequest(URLRequest(url: resolvedIPRSURL))
tabManager.selectedTab?.loadRequest(URLRequest(url: resolvedIPFSURL))
} else {
tabManager.selectedTab?.loadRequest(URLRequest(url: resolvedURL))
}
Expand Down Expand Up @@ -282,9 +282,9 @@ extension BrowserViewController: TopToolbarDelegate {
return true
case .load(let resolvedURL):
if resolvedURL.isIPFSScheme,
let resolvedIPRSURL = braveCore.ipfsAPI.resolveGatewayUrl(for: resolvedURL)
let resolvedIPFSURL = braveCore.ipfsAPI.resolveGatewayUrl(for: resolvedURL)
{
finishEditingAndSubmit(resolvedIPRSURL)
finishEditingAndSubmit(resolvedIPFSURL)
} else {
finishEditingAndSubmit(resolvedURL)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ extension BrowserViewController: WKNavigationDelegate {
return (.cancel, preferences)
case .load(let resolvedURL):
if resolvedURL.isIPFSScheme,
let resolvedIPRSURL = braveCore.ipfsAPI.resolveGatewayUrl(for: resolvedURL)
let resolvedIPFSURL = braveCore.ipfsAPI.resolveGatewayUrl(for: resolvedURL)
{
requestURL = resolvedIPRSURL
requestURL = resolvedIPFSURL
} else {
requestURL = resolvedURL
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ extension BrowserViewController: Web3NameServiceScriptHandlerDelegate {
switch result {
case .load(let resolvedURL):
if resolvedURL.isIPFSScheme,
let resolvedIPRSURL = braveCore.ipfsAPI.resolveGatewayUrl(for: resolvedURL)
let resolvedIPFSURL = braveCore.ipfsAPI.resolveGatewayUrl(for: resolvedURL)
{
finishEditingAndSubmit(resolvedIPRSURL)
finishEditingAndSubmit(resolvedIPFSURL)
} else {
finishEditingAndSubmit(resolvedURL)
}
Expand Down

0 comments on commit 8dd42ab

Please sign in to comment.