@depay/web3-wallets-evm 14.6.1 → 14.6.2
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/dist/esm/index.evm.js +15 -3
- package/dist/esm/index.js +15 -3
- package/dist/umd/index.evm.js +15 -3
- package/dist/umd/index.js +15 -3
- package/package.json +1 -1
package/dist/esm/index.evm.js
CHANGED
|
@@ -59903,12 +59903,18 @@ class Argent {
|
|
|
59903
59903
|
}
|
|
59904
59904
|
}
|
|
59905
59905
|
|
|
59906
|
-
const
|
|
59906
|
+
const transactionApiBlockchainNames = {
|
|
59907
59907
|
'ethereum': 'mainnet',
|
|
59908
59908
|
'bsc': 'bsc',
|
|
59909
59909
|
'polygon': 'polygon',
|
|
59910
59910
|
};
|
|
59911
59911
|
|
|
59912
|
+
const explorerBlockchainNames = {
|
|
59913
|
+
'ethereum': 'eth',
|
|
59914
|
+
'bsc': 'bnb',
|
|
59915
|
+
'polygon': 'matic',
|
|
59916
|
+
};
|
|
59917
|
+
|
|
59912
59918
|
class Safe {
|
|
59913
59919
|
|
|
59914
59920
|
constructor ({ address, blockchain }) {
|
|
@@ -59927,7 +59933,7 @@ class Safe {
|
|
|
59927
59933
|
|
|
59928
59934
|
async retrieveTransaction({ blockchain, tx }) {
|
|
59929
59935
|
const provider = await getProvider(blockchain);
|
|
59930
|
-
let jsonResult = await fetch(`https://safe-transaction-${
|
|
59936
|
+
let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[blockchain]}.safe.global/api/v1/multisig-transactions/${tx}/`)
|
|
59931
59937
|
.then((response) => response.json())
|
|
59932
59938
|
.catch((error) => { console.error('Error:', error); });
|
|
59933
59939
|
if(jsonResult && jsonResult.isExecuted && jsonResult.transactionHash) {
|
|
@@ -59936,6 +59942,12 @@ class Safe {
|
|
|
59936
59942
|
return undefined
|
|
59937
59943
|
}
|
|
59938
59944
|
}
|
|
59945
|
+
|
|
59946
|
+
explorerUrlFor({ transaction }) {
|
|
59947
|
+
if(transaction) {
|
|
59948
|
+
return `https://app.safe.global/${explorerBlockchainNames[transaction.blockchain]}:${transaction.from}/transactions/tx?id=multisig_${transaction.from}_${transaction.id}`
|
|
59949
|
+
}
|
|
59950
|
+
}
|
|
59939
59951
|
}
|
|
59940
59952
|
|
|
59941
59953
|
const isSmartContractWallet = async(blockchain, address)=>{
|
|
@@ -59998,7 +60010,7 @@ const sendTransaction$3 = async ({ transaction, wallet })=> {
|
|
|
59998
60010
|
if (tx) {
|
|
59999
60011
|
let blockchain = Blockchain.findByName(transaction.blockchain);
|
|
60000
60012
|
transaction.id = tx;
|
|
60001
|
-
transaction.url = blockchain.explorerUrlFor({ transaction });
|
|
60013
|
+
transaction.url = smartContractWallet && smartContractWallet.explorerUrlFor ? smartContractWallet.explorerUrlFor({ transaction }) : blockchain.explorerUrlFor({ transaction });
|
|
60002
60014
|
if (transaction.sent) transaction.sent(transaction);
|
|
60003
60015
|
let sentTransaction = await retrieveTransaction$1({ blockchain: transaction.blockchain, tx, smartContractWallet });
|
|
60004
60016
|
transaction.id = sentTransaction.hash || transaction.id;
|
package/dist/esm/index.js
CHANGED
|
@@ -997,12 +997,18 @@ class Argent {
|
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
|
|
1000
|
-
const
|
|
1000
|
+
const transactionApiBlockchainNames = {
|
|
1001
1001
|
'ethereum': 'mainnet',
|
|
1002
1002
|
'bsc': 'bsc',
|
|
1003
1003
|
'polygon': 'polygon',
|
|
1004
1004
|
};
|
|
1005
1005
|
|
|
1006
|
+
const explorerBlockchainNames = {
|
|
1007
|
+
'ethereum': 'eth',
|
|
1008
|
+
'bsc': 'bnb',
|
|
1009
|
+
'polygon': 'matic',
|
|
1010
|
+
};
|
|
1011
|
+
|
|
1006
1012
|
class Safe {
|
|
1007
1013
|
|
|
1008
1014
|
constructor ({ address, blockchain }) {
|
|
@@ -1021,7 +1027,7 @@ class Safe {
|
|
|
1021
1027
|
|
|
1022
1028
|
async retrieveTransaction({ blockchain, tx }) {
|
|
1023
1029
|
const provider = await getProvider(blockchain);
|
|
1024
|
-
let jsonResult = await fetch(`https://safe-transaction-${
|
|
1030
|
+
let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[blockchain]}.safe.global/api/v1/multisig-transactions/${tx}/`)
|
|
1025
1031
|
.then((response) => response.json())
|
|
1026
1032
|
.catch((error) => { console.error('Error:', error); });
|
|
1027
1033
|
if(jsonResult && jsonResult.isExecuted && jsonResult.transactionHash) {
|
|
@@ -1030,6 +1036,12 @@ class Safe {
|
|
|
1030
1036
|
return undefined
|
|
1031
1037
|
}
|
|
1032
1038
|
}
|
|
1039
|
+
|
|
1040
|
+
explorerUrlFor({ transaction }) {
|
|
1041
|
+
if(transaction) {
|
|
1042
|
+
return `https://app.safe.global/${explorerBlockchainNames[transaction.blockchain]}:${transaction.from}/transactions/tx?id=multisig_${transaction.from}_${transaction.id}`
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1033
1045
|
}
|
|
1034
1046
|
|
|
1035
1047
|
const isSmartContractWallet = async(blockchain, address)=>{
|
|
@@ -1092,7 +1104,7 @@ const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
|
1092
1104
|
if (tx) {
|
|
1093
1105
|
let blockchain = Blockchain.findByName(transaction.blockchain);
|
|
1094
1106
|
transaction.id = tx;
|
|
1095
|
-
transaction.url = blockchain.explorerUrlFor({ transaction });
|
|
1107
|
+
transaction.url = smartContractWallet && smartContractWallet.explorerUrlFor ? smartContractWallet.explorerUrlFor({ transaction }) : blockchain.explorerUrlFor({ transaction });
|
|
1096
1108
|
if (transaction.sent) transaction.sent(transaction);
|
|
1097
1109
|
let sentTransaction = await retrieveTransaction$1({ blockchain: transaction.blockchain, tx, smartContractWallet });
|
|
1098
1110
|
transaction.id = sentTransaction.hash || transaction.id;
|
package/dist/umd/index.evm.js
CHANGED
|
@@ -59901,12 +59901,18 @@
|
|
|
59901
59901
|
}
|
|
59902
59902
|
}
|
|
59903
59903
|
|
|
59904
|
-
const
|
|
59904
|
+
const transactionApiBlockchainNames = {
|
|
59905
59905
|
'ethereum': 'mainnet',
|
|
59906
59906
|
'bsc': 'bsc',
|
|
59907
59907
|
'polygon': 'polygon',
|
|
59908
59908
|
};
|
|
59909
59909
|
|
|
59910
|
+
const explorerBlockchainNames = {
|
|
59911
|
+
'ethereum': 'eth',
|
|
59912
|
+
'bsc': 'bnb',
|
|
59913
|
+
'polygon': 'matic',
|
|
59914
|
+
};
|
|
59915
|
+
|
|
59910
59916
|
class Safe {
|
|
59911
59917
|
|
|
59912
59918
|
constructor ({ address, blockchain }) {
|
|
@@ -59925,7 +59931,7 @@
|
|
|
59925
59931
|
|
|
59926
59932
|
async retrieveTransaction({ blockchain, tx }) {
|
|
59927
59933
|
const provider = await getProvider(blockchain);
|
|
59928
|
-
let jsonResult = await fetch(`https://safe-transaction-${
|
|
59934
|
+
let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[blockchain]}.safe.global/api/v1/multisig-transactions/${tx}/`)
|
|
59929
59935
|
.then((response) => response.json())
|
|
59930
59936
|
.catch((error) => { console.error('Error:', error); });
|
|
59931
59937
|
if(jsonResult && jsonResult.isExecuted && jsonResult.transactionHash) {
|
|
@@ -59934,6 +59940,12 @@
|
|
|
59934
59940
|
return undefined
|
|
59935
59941
|
}
|
|
59936
59942
|
}
|
|
59943
|
+
|
|
59944
|
+
explorerUrlFor({ transaction }) {
|
|
59945
|
+
if(transaction) {
|
|
59946
|
+
return `https://app.safe.global/${explorerBlockchainNames[transaction.blockchain]}:${transaction.from}/transactions/tx?id=multisig_${transaction.from}_${transaction.id}`
|
|
59947
|
+
}
|
|
59948
|
+
}
|
|
59937
59949
|
}
|
|
59938
59950
|
|
|
59939
59951
|
const isSmartContractWallet = async(blockchain, address)=>{
|
|
@@ -59996,7 +60008,7 @@
|
|
|
59996
60008
|
if (tx) {
|
|
59997
60009
|
let blockchain = web3Blockchains.Blockchain.findByName(transaction.blockchain);
|
|
59998
60010
|
transaction.id = tx;
|
|
59999
|
-
transaction.url = blockchain.explorerUrlFor({ transaction });
|
|
60011
|
+
transaction.url = smartContractWallet && smartContractWallet.explorerUrlFor ? smartContractWallet.explorerUrlFor({ transaction }) : blockchain.explorerUrlFor({ transaction });
|
|
60000
60012
|
if (transaction.sent) transaction.sent(transaction);
|
|
60001
60013
|
let sentTransaction = await retrieveTransaction$1({ blockchain: transaction.blockchain, tx, smartContractWallet });
|
|
60002
60014
|
transaction.id = sentTransaction.hash || transaction.id;
|
package/dist/umd/index.js
CHANGED
|
@@ -994,12 +994,18 @@
|
|
|
994
994
|
}
|
|
995
995
|
}
|
|
996
996
|
|
|
997
|
-
const
|
|
997
|
+
const transactionApiBlockchainNames = {
|
|
998
998
|
'ethereum': 'mainnet',
|
|
999
999
|
'bsc': 'bsc',
|
|
1000
1000
|
'polygon': 'polygon',
|
|
1001
1001
|
};
|
|
1002
1002
|
|
|
1003
|
+
const explorerBlockchainNames = {
|
|
1004
|
+
'ethereum': 'eth',
|
|
1005
|
+
'bsc': 'bnb',
|
|
1006
|
+
'polygon': 'matic',
|
|
1007
|
+
};
|
|
1008
|
+
|
|
1003
1009
|
class Safe {
|
|
1004
1010
|
|
|
1005
1011
|
constructor ({ address, blockchain }) {
|
|
@@ -1018,7 +1024,7 @@
|
|
|
1018
1024
|
|
|
1019
1025
|
async retrieveTransaction({ blockchain, tx }) {
|
|
1020
1026
|
const provider = await web3Client.getProvider(blockchain);
|
|
1021
|
-
let jsonResult = await fetch(`https://safe-transaction-${
|
|
1027
|
+
let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[blockchain]}.safe.global/api/v1/multisig-transactions/${tx}/`)
|
|
1022
1028
|
.then((response) => response.json())
|
|
1023
1029
|
.catch((error) => { console.error('Error:', error); });
|
|
1024
1030
|
if(jsonResult && jsonResult.isExecuted && jsonResult.transactionHash) {
|
|
@@ -1027,6 +1033,12 @@
|
|
|
1027
1033
|
return undefined
|
|
1028
1034
|
}
|
|
1029
1035
|
}
|
|
1036
|
+
|
|
1037
|
+
explorerUrlFor({ transaction }) {
|
|
1038
|
+
if(transaction) {
|
|
1039
|
+
return `https://app.safe.global/${explorerBlockchainNames[transaction.blockchain]}:${transaction.from}/transactions/tx?id=multisig_${transaction.from}_${transaction.id}`
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1030
1042
|
}
|
|
1031
1043
|
|
|
1032
1044
|
const isSmartContractWallet = async(blockchain, address)=>{
|
|
@@ -1089,7 +1101,7 @@
|
|
|
1089
1101
|
if (tx) {
|
|
1090
1102
|
let blockchain = web3Blockchains.Blockchain.findByName(transaction.blockchain);
|
|
1091
1103
|
transaction.id = tx;
|
|
1092
|
-
transaction.url = blockchain.explorerUrlFor({ transaction });
|
|
1104
|
+
transaction.url = smartContractWallet && smartContractWallet.explorerUrlFor ? smartContractWallet.explorerUrlFor({ transaction }) : blockchain.explorerUrlFor({ transaction });
|
|
1093
1105
|
if (transaction.sent) transaction.sent(transaction);
|
|
1094
1106
|
let sentTransaction = await retrieveTransaction$1({ blockchain: transaction.blockchain, tx, smartContractWallet });
|
|
1095
1107
|
transaction.id = sentTransaction.hash || transaction.id;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depay/web3-wallets-evm",
|
|
3
3
|
"moduleName": "Web3Wallets",
|
|
4
|
-
"version": "14.6.
|
|
4
|
+
"version": "14.6.2",
|
|
5
5
|
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
|
|
6
6
|
"main": "dist/umd/index.evm.js",
|
|
7
7
|
"module": "dist/esm/index.evm.js",
|