Skip to content

Commit

Permalink
Merge pull request #222 from near/SQAC-101/fix-near-wallet
Browse files Browse the repository at this point in the history
fix: [SQAC-101] Fix NEAR Wallet walletUrl Resolution
  • Loading branch information
lewis-sqa authored Mar 30, 2022
2 parents 789eeab + 69de976 commit d1e2297
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions packages/near-wallet-selector/src/wallets/browser/NearWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,17 @@ function setupNearWallet({
return walletUrl;
}

if (typeof options.network === "string") {
return `https://wallet.${options.network}.near.org`;
switch (network.networkId) {
case "mainnet":
return "https://wallet.near.org";
case "testnet":
return "https://wallet.testnet.near.org";
case "betanet":
return "https://wallet.betanet.near.org";
default:
// TODO: Throw once wallets are separate packages.
return "https://wallet.testnet.near.org";
}

// TODO: Throw once wallets are separate packages.
return undefined;
};

return {
Expand Down

0 comments on commit d1e2297

Please sign in to comment.