Skip to content

Commit 5c6f784

Browse files
authored
Merge pull request #118 from liquality/fix/fixDefaultProvider
fix default provider issue
2 parents 33be7dc + 86e813d commit 5c6f784

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/poor-weeks-train.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@liquality/wallet-sdk": patch
3+
---
4+
5+
Update chain-providers for MATIC Mainnet

packages/sdk/src/factory/chain-provider.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export function createChainProvider(chainId: number) {
2828
let chainProvider;
2929
if (chainId === CHAIN_IDS.BNB_MAINNET) {
3030
chainProvider = new ethers.providers.JsonRpcProvider('https://bsc-dataseed.binance.org/', 56);
31+
} else if (chainId === CHAIN_IDS.MATIC_MAINNET) {
32+
chainProvider = new ethers.providers.JsonRpcProvider(CHAINS[chainId].providerRPCs.ALCHEMY+Config.ALCHEMY_API_KEY , 137);
3133
} else if (chainId === CHAIN_IDS.MATIC_MUMBAI) {
3234
chainProvider = new ethers.providers.JsonRpcProvider(CHAINS[chainId].providerRPCs.ALCHEMY+Config.ALCHEMY_API_KEY , 80001);
3335
}

0 commit comments

Comments
 (0)