Skip to content

Commit 765c0cd

Browse files
wa0x6eCopilotChaituVR
authored
fix: use a dedicated key for brovider id (#1167)
* fix: use a dedicated key for brovider id * Update src/utils/provider.ts Co-authored-by: Copilot <[email protected]> * v0.14.3 --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: Chaitanya <[email protected]>
1 parent 4bc5222 commit 765c0cd

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@snapshot-labs/snapshot.js",
3-
"version": "0.14.2",
3+
"version": "0.14.3",
44
"repository": "snapshot-labs/snapshot.js",
55
"license": "MIT",
66
"main": "dist/snapshot.cjs.js",

src/networks.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,12 +1972,13 @@
19721972
"logo": "ipfs://QmNnGPr1CNvj12SSGzKARtUHv9FyEfE5nES73U4vBWQSJL"
19731973
},
19741974
"0x534e5f4d41494e": {
1975-
"key": "sn",
1975+
"key": "0x534e5f4d41494e",
19761976
"name": "Starknet",
19771977
"shortName": "Starknet",
19781978
"chainId": "0x534e5f4d41494e",
19791979
"network": "mainnet",
19801980
"starknet": true,
1981+
"broviderId": "sn",
19811982
"multicall": "0x05754af3760f3356da99aea5c3ec39ccac7783d925a19666ebbeca58ff0087f4",
19821983
"explorer": {
19831984
"url": "https://starkscan.co"
@@ -1987,12 +1988,13 @@
19871988
"logo": "ipfs://bafkreihbjafyh7eud7r6e5743esaamifcttsvbspfwcrfoc5ykodjdi67m"
19881989
},
19891990
"0x534e5f5345504f4c4941": {
1990-
"key": "sn-sep",
1991-
"name": "Starknet Testnet",
1991+
"key": "0x534e5f5345504f4c4941",
1992+
"name": "Starknet Sepolia",
19921993
"shortName": "testnet",
19931994
"chainId": "0x534e5f5345504f4c4941",
19941995
"network": "testnet",
19951996
"starknet": true,
1997+
"broviderId": "sn-sep",
19961998
"testnet": true,
19971999
"multicall": "0x05754af3760f3356da99aea5c3ec39ccac7783d925a19666ebbeca58ff0087f4",
19982000
"explorer": {

src/utils/provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function getBroviderNetworkId(network: string | number): string {
3838
if (!config) {
3939
throw new Error(`Network '${network}' is not supported`);
4040
}
41-
return String(config.key);
41+
return config.broviderId || String(network);
4242
}
4343

4444
function getProviderType(network: string | number): ProviderType {

0 commit comments

Comments
 (0)