-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/iframes-chrome-allowed-dapps
* develop: chore(release): 1.0.25 [skip ci] fix: rpc urls for mainnet chore: removed console log fix: allow custom provider for argent mobile connector fix: allow custom provider for webwallet connector fix: allow custom provider for injected connectors chore(release): 1.0.24 [skip ci] fix: argent mobile connector icon url parameter chore(release): 1.0.23 [skip ci] fix: prevent creating multiple root divs chore: update sn.js version chore(release): 1.0.22 [skip ci] fix: use rpc provider instead of sequencer for webwallet
- Loading branch information
Showing
14 changed files
with
149 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { RPC_NODE_URL_MAINNET, RPC_NODE_URL_TESTNET } from "../constants" | ||
|
||
export function mapTargetUrlToNodeUrl(target: string): string { | ||
try { | ||
const { origin } = new URL(target) | ||
if (origin.includes("localhost") || origin.includes("127.0.0.1")) { | ||
return RPC_NODE_URL_TESTNET | ||
} | ||
if (origin.includes("hydrogen")) { | ||
return RPC_NODE_URL_TESTNET | ||
} | ||
if (origin.includes("staging")) { | ||
return RPC_NODE_URL_MAINNET | ||
} | ||
if (origin.includes("argent.xyz")) { | ||
return RPC_NODE_URL_MAINNET | ||
} | ||
} catch (e) { | ||
console.warn( | ||
"Could not determine rpc nodeUrl from target URL, defaulting to mainnet", | ||
) | ||
} | ||
return RPC_NODE_URL_MAINNET | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.