dracoder-web3-package 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -5
- package/package.json +4 -4
package/index.js
CHANGED
@@ -185,7 +185,7 @@ const getTokenOwnersBalance = async ({tokenAddress, ...extraParams}) => {
|
|
185
185
|
});
|
186
186
|
}
|
187
187
|
|
188
|
-
const sendTokenToWallet = async ({tokenAddress
|
188
|
+
const sendTokenToWallet = async ({tokenAddress}) => {
|
189
189
|
await metamaskConnect().catch(error => {
|
190
190
|
throw error
|
191
191
|
});
|
@@ -257,7 +257,7 @@ const checkWalletFormat = (account) => {
|
|
257
257
|
}
|
258
258
|
}
|
259
259
|
|
260
|
-
const selectOrAddPolygonMainNetwork = async (
|
260
|
+
const selectOrAddPolygonMainNetwork = async () => {
|
261
261
|
await metamaskConnect().catch(error => {
|
262
262
|
throw error
|
263
263
|
});
|
@@ -273,7 +273,7 @@ const selectOrAddPolygonMainNetwork = async ({...extraParameters}) => {
|
|
273
273
|
// This error code indicates that the chain has not been added to MetaMask.
|
274
274
|
const params = [{
|
275
275
|
chainId: '0x89',
|
276
|
-
chainName: 'Matic
|
276
|
+
chainName: 'Matic MainNet',
|
277
277
|
nativeCurrency: {
|
278
278
|
name: 'MATIC',
|
279
279
|
symbol: 'MATIC',
|
@@ -290,13 +290,13 @@ const selectOrAddPolygonMainNetwork = async ({...extraParameters}) => {
|
|
290
290
|
});
|
291
291
|
return {
|
292
292
|
ok: true,
|
293
|
-
message: "Matic
|
293
|
+
message: "Matic MainNet added successfully",
|
294
294
|
response: response
|
295
295
|
}
|
296
296
|
} catch (error) {
|
297
297
|
return {
|
298
298
|
ok: false,
|
299
|
-
message: "Matic
|
299
|
+
message: "Matic MainNet can not be added",
|
300
300
|
response: error
|
301
301
|
}
|
302
302
|
}
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "dracoder-web3-package",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.1",
|
4
4
|
"description": "Dracoder package used for web3 provider integration.",
|
5
5
|
"main": "index.js",
|
6
6
|
"keywords": [
|
7
|
-
"
|
7
|
+
"dracoder",
|
8
8
|
"web3",
|
9
9
|
"api",
|
10
10
|
"metamask"
|
@@ -15,7 +15,7 @@
|
|
15
15
|
"author": "Dracoder S.L.",
|
16
16
|
"license": "MIT",
|
17
17
|
"dependencies": {
|
18
|
-
"axios": "^
|
19
|
-
"web3": "^
|
18
|
+
"axios": "^0.21.1",
|
19
|
+
"web3": "^1.6.0"
|
20
20
|
}
|
21
21
|
}
|