@depay/web3-wallets-evm 14.6.2 → 14.6.4
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/README.md +39 -8
- package/dist/esm/index.evm.js +37 -27
- package/dist/esm/index.js +37 -27
- package/dist/umd/index.evm.js +37 -27
- package/dist/umd/index.js +37 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -224,29 +224,60 @@ await wallet.switchTo('bsc')
|
|
|
224
224
|
|
|
225
225
|
### Transaction
|
|
226
226
|
|
|
227
|
+
### Data Structure
|
|
228
|
+
|
|
229
|
+
`api: Array`: Api of the contract (e.g. abi for Ethereum).
|
|
230
|
+
|
|
231
|
+
`blockchain: String`: Name of the blockchain e.g. 'ethereum'.
|
|
232
|
+
|
|
233
|
+
`failed: Function (transaction, error)=>{}`: Callback to be executed if transaction failed (e.g. reverted).
|
|
234
|
+
|
|
235
|
+
`from: String`: Address of the transaction sender.
|
|
236
|
+
|
|
237
|
+
`id: String`: Identifier of the transaction.
|
|
238
|
+
|
|
239
|
+
`instructions: Array`: List of instructions (e.g. Solana).
|
|
240
|
+
|
|
241
|
+
`method: String`: Name of the contract method to be called.
|
|
242
|
+
|
|
243
|
+
`nonce: Integer`: Nonce (number only used once) of the transaction.
|
|
244
|
+
|
|
245
|
+
`params: Object or Array`: Parameters passed to the method.
|
|
246
|
+
|
|
247
|
+
`sent: Function (transaction)=>{}`: Callback to be executed if transaction has been sent to the network.
|
|
248
|
+
|
|
249
|
+
`succeeded: Function (transaction)=>{}`: Callback to be executed if transaction was successful and has been confirmed once by the network.
|
|
250
|
+
|
|
251
|
+
`to String`: Address of the contract to be transacted with.
|
|
252
|
+
|
|
253
|
+
`url String`: Url to open the transaction (e.g. in an explorer).
|
|
254
|
+
|
|
255
|
+
`value: Number or BigNumber as String`: Value of the transaction (amount of the native blockchain currency sent along with the transaction).
|
|
256
|
+
|
|
227
257
|
### sendTransaction
|
|
228
258
|
|
|
229
259
|
#### EVM: sendTransaction
|
|
230
260
|
|
|
231
261
|
Available arguments for EVM blockchains:
|
|
232
262
|
|
|
233
|
-
`
|
|
263
|
+
`api: Array`: Api of the contract (e.g. abi for Ethereum).
|
|
234
264
|
|
|
235
|
-
`
|
|
265
|
+
`blockchain: String`: Name of the blockchain e.g. 'ethereum'.
|
|
236
266
|
|
|
237
|
-
`
|
|
267
|
+
`failed: Function (transaction, error)=>{}`: Callback to be executed if transaction failed (e.g. reverted).
|
|
238
268
|
|
|
239
269
|
`method: String`: Name of the contract method to be called.
|
|
240
270
|
|
|
241
271
|
`params: Object or Array`: Parameters passed to the method.
|
|
242
272
|
|
|
243
|
-
`value: Number or BigNumber as String`: Value of the transaction (amount of the native blockchain currency sent along with the transaction).
|
|
244
|
-
|
|
245
273
|
`sent: Function (transaction)=>{}`: Callback to be executed if transaction has been sent to the network.
|
|
246
274
|
|
|
247
275
|
`succeeded: Function (transaction)=>{}`: Callback to be executed if transaction was successful and has been confirmed once by the network.
|
|
248
276
|
|
|
249
|
-
`
|
|
277
|
+
`to String`: Address of the contract to be transacted with.
|
|
278
|
+
|
|
279
|
+
`value: Number or BigNumber as String`: Value of the transaction (amount of the native blockchain currency sent along with the transaction).
|
|
280
|
+
|
|
250
281
|
|
|
251
282
|
##### EVM: Simple value transfer
|
|
252
283
|
|
|
@@ -292,12 +323,12 @@ Available arguments for Solana blockchains:
|
|
|
292
323
|
|
|
293
324
|
`blockchain: String`: Name of the blockchain e.g. 'solana'.
|
|
294
325
|
|
|
326
|
+
`failed: Function (transaction, error)=>{}`: Callback to be executed if transaction failed (e.g. reverted).
|
|
327
|
+
|
|
295
328
|
`sent: Function (transaction)=>{}`: Callback to be executed if transaction has been sent to the network.
|
|
296
329
|
|
|
297
330
|
`succeeded: Function (transaction)=>{}`: Callback to be executed if transaction was successful and has been confirmed once by the network.
|
|
298
331
|
|
|
299
|
-
`failed: Function (transaction, error)=>{}`: Callback to be executed if transaction failed (e.g. reverted).
|
|
300
|
-
|
|
301
332
|
##### Solana: Simple value transfer
|
|
302
333
|
|
|
303
334
|
e.g. send 0.01 SOL on Solana:
|
package/dist/esm/index.evm.js
CHANGED
|
@@ -59923,12 +59923,21 @@ class Safe {
|
|
|
59923
59923
|
}
|
|
59924
59924
|
|
|
59925
59925
|
async transactionCount() {
|
|
59926
|
-
|
|
59927
|
-
|
|
59928
|
-
|
|
59929
|
-
|
|
59930
|
-
|
|
59931
|
-
|
|
59926
|
+
let transactionCount;
|
|
59927
|
+
let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[blockchain]}.safe.global/api/v1/safes/${this.address}/`)
|
|
59928
|
+
.then((response) => response.json())
|
|
59929
|
+
.catch((error) => { console.error('Error:', error); });
|
|
59930
|
+
if(jsonResult && jsonResult.nonce) {
|
|
59931
|
+
transactionCount = jsonResult.nonce;
|
|
59932
|
+
} else {
|
|
59933
|
+
transactionCount = parseInt((await request({
|
|
59934
|
+
blockchain: this.blockchain,
|
|
59935
|
+
address: this.address,
|
|
59936
|
+
api: [{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],
|
|
59937
|
+
method: 'nonce',
|
|
59938
|
+
})).toString(), 10);
|
|
59939
|
+
}
|
|
59940
|
+
return transactionCount
|
|
59932
59941
|
}
|
|
59933
59942
|
|
|
59934
59943
|
async retrieveTransaction({ blockchain, tx }) {
|
|
@@ -60006,34 +60015,35 @@ const sendTransaction$3 = async ({ transaction, wallet })=> {
|
|
|
60006
60015
|
const smartContractWallet = await getSmartContractWallet(transaction.blockchain, transaction.from);
|
|
60007
60016
|
const transactionCount = smartContractWallet ? await smartContractWallet.transactionCount() : await request({ blockchain: transaction.blockchain, method: 'transactionCount', address: transaction.from });
|
|
60008
60017
|
transaction.nonce = transactionCount;
|
|
60009
|
-
await submit$3({ transaction, wallet }).then(
|
|
60018
|
+
await submit$3({ transaction, wallet }).then((tx)=>{
|
|
60010
60019
|
if (tx) {
|
|
60011
60020
|
let blockchain = Blockchain.findByName(transaction.blockchain);
|
|
60012
60021
|
transaction.id = tx;
|
|
60013
60022
|
transaction.url = smartContractWallet && smartContractWallet.explorerUrlFor ? smartContractWallet.explorerUrlFor({ transaction }) : blockchain.explorerUrlFor({ transaction });
|
|
60014
60023
|
if (transaction.sent) transaction.sent(transaction);
|
|
60015
|
-
|
|
60016
|
-
|
|
60017
|
-
|
|
60018
|
-
|
|
60019
|
-
|
|
60020
|
-
|
|
60021
|
-
|
|
60022
|
-
|
|
60023
|
-
|
|
60024
|
-
|
|
60025
|
-
|
|
60026
|
-
|
|
60027
|
-
|
|
60028
|
-
|
|
60029
|
-
|
|
60024
|
+
retrieveTransaction$1({ blockchain: transaction.blockchain, tx, smartContractWallet }).then((sentTransaction)=>{
|
|
60025
|
+
transaction.id = sentTransaction.hash || transaction.id;
|
|
60026
|
+
transaction.url = blockchain.explorerUrlFor({ transaction });
|
|
60027
|
+
transaction.nonce = sentTransaction.nonce || transactionCount;
|
|
60028
|
+
sentTransaction.wait(1).then(() => {
|
|
60029
|
+
transaction._succeeded = true;
|
|
60030
|
+
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
60031
|
+
}).catch((error)=>{
|
|
60032
|
+
if(error && error.code && error.code == 'TRANSACTION_REPLACED') {
|
|
60033
|
+
if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 1) {
|
|
60034
|
+
transaction.id = error.replacement.hash;
|
|
60035
|
+
transaction._succeeded = true;
|
|
60036
|
+
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
60037
|
+
} else if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 0) {
|
|
60038
|
+
transaction.id = error.replacement.hash;
|
|
60039
|
+
transaction._failed = true;
|
|
60040
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
60041
|
+
}
|
|
60042
|
+
} else {
|
|
60030
60043
|
transaction._failed = true;
|
|
60031
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
60044
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
60032
60045
|
}
|
|
60033
|
-
}
|
|
60034
|
-
transaction._failed = true;
|
|
60035
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
60036
|
-
}
|
|
60046
|
+
});
|
|
60037
60047
|
});
|
|
60038
60048
|
} else {
|
|
60039
60049
|
throw('Submitting transaction failed!')
|
package/dist/esm/index.js
CHANGED
|
@@ -1017,12 +1017,21 @@ class Safe {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
|
|
1019
1019
|
async transactionCount() {
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1020
|
+
let transactionCount;
|
|
1021
|
+
let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[blockchain]}.safe.global/api/v1/safes/${this.address}/`)
|
|
1022
|
+
.then((response) => response.json())
|
|
1023
|
+
.catch((error) => { console.error('Error:', error); });
|
|
1024
|
+
if(jsonResult && jsonResult.nonce) {
|
|
1025
|
+
transactionCount = jsonResult.nonce;
|
|
1026
|
+
} else {
|
|
1027
|
+
transactionCount = parseInt((await request$1({
|
|
1028
|
+
blockchain: this.blockchain,
|
|
1029
|
+
address: this.address,
|
|
1030
|
+
api: [{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],
|
|
1031
|
+
method: 'nonce',
|
|
1032
|
+
})).toString(), 10);
|
|
1033
|
+
}
|
|
1034
|
+
return transactionCount
|
|
1026
1035
|
}
|
|
1027
1036
|
|
|
1028
1037
|
async retrieveTransaction({ blockchain, tx }) {
|
|
@@ -1100,34 +1109,35 @@ const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
|
1100
1109
|
const smartContractWallet = await getSmartContractWallet(transaction.blockchain, transaction.from);
|
|
1101
1110
|
const transactionCount = smartContractWallet ? await smartContractWallet.transactionCount() : await request$1({ blockchain: transaction.blockchain, method: 'transactionCount', address: transaction.from });
|
|
1102
1111
|
transaction.nonce = transactionCount;
|
|
1103
|
-
await submit$2({ transaction, wallet }).then(
|
|
1112
|
+
await submit$2({ transaction, wallet }).then((tx)=>{
|
|
1104
1113
|
if (tx) {
|
|
1105
1114
|
let blockchain = Blockchain.findByName(transaction.blockchain);
|
|
1106
1115
|
transaction.id = tx;
|
|
1107
1116
|
transaction.url = smartContractWallet && smartContractWallet.explorerUrlFor ? smartContractWallet.explorerUrlFor({ transaction }) : blockchain.explorerUrlFor({ transaction });
|
|
1108
1117
|
if (transaction.sent) transaction.sent(transaction);
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1118
|
+
retrieveTransaction$1({ blockchain: transaction.blockchain, tx, smartContractWallet }).then((sentTransaction)=>{
|
|
1119
|
+
transaction.id = sentTransaction.hash || transaction.id;
|
|
1120
|
+
transaction.url = blockchain.explorerUrlFor({ transaction });
|
|
1121
|
+
transaction.nonce = sentTransaction.nonce || transactionCount;
|
|
1122
|
+
sentTransaction.wait(1).then(() => {
|
|
1123
|
+
transaction._succeeded = true;
|
|
1124
|
+
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
1125
|
+
}).catch((error)=>{
|
|
1126
|
+
if(error && error.code && error.code == 'TRANSACTION_REPLACED') {
|
|
1127
|
+
if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 1) {
|
|
1128
|
+
transaction.id = error.replacement.hash;
|
|
1129
|
+
transaction._succeeded = true;
|
|
1130
|
+
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
1131
|
+
} else if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 0) {
|
|
1132
|
+
transaction.id = error.replacement.hash;
|
|
1133
|
+
transaction._failed = true;
|
|
1134
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
1135
|
+
}
|
|
1136
|
+
} else {
|
|
1124
1137
|
transaction._failed = true;
|
|
1125
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
1138
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
1126
1139
|
}
|
|
1127
|
-
}
|
|
1128
|
-
transaction._failed = true;
|
|
1129
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
1130
|
-
}
|
|
1140
|
+
});
|
|
1131
1141
|
});
|
|
1132
1142
|
} else {
|
|
1133
1143
|
throw('Submitting transaction failed!')
|
package/dist/umd/index.evm.js
CHANGED
|
@@ -59921,12 +59921,21 @@
|
|
|
59921
59921
|
}
|
|
59922
59922
|
|
|
59923
59923
|
async transactionCount() {
|
|
59924
|
-
|
|
59925
|
-
|
|
59926
|
-
|
|
59927
|
-
|
|
59928
|
-
|
|
59929
|
-
|
|
59924
|
+
let transactionCount;
|
|
59925
|
+
let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[blockchain]}.safe.global/api/v1/safes/${this.address}/`)
|
|
59926
|
+
.then((response) => response.json())
|
|
59927
|
+
.catch((error) => { console.error('Error:', error); });
|
|
59928
|
+
if(jsonResult && jsonResult.nonce) {
|
|
59929
|
+
transactionCount = jsonResult.nonce;
|
|
59930
|
+
} else {
|
|
59931
|
+
transactionCount = parseInt((await request({
|
|
59932
|
+
blockchain: this.blockchain,
|
|
59933
|
+
address: this.address,
|
|
59934
|
+
api: [{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],
|
|
59935
|
+
method: 'nonce',
|
|
59936
|
+
})).toString(), 10);
|
|
59937
|
+
}
|
|
59938
|
+
return transactionCount
|
|
59930
59939
|
}
|
|
59931
59940
|
|
|
59932
59941
|
async retrieveTransaction({ blockchain, tx }) {
|
|
@@ -60004,34 +60013,35 @@
|
|
|
60004
60013
|
const smartContractWallet = await getSmartContractWallet(transaction.blockchain, transaction.from);
|
|
60005
60014
|
const transactionCount = smartContractWallet ? await smartContractWallet.transactionCount() : await request({ blockchain: transaction.blockchain, method: 'transactionCount', address: transaction.from });
|
|
60006
60015
|
transaction.nonce = transactionCount;
|
|
60007
|
-
await submit$3({ transaction, wallet }).then(
|
|
60016
|
+
await submit$3({ transaction, wallet }).then((tx)=>{
|
|
60008
60017
|
if (tx) {
|
|
60009
60018
|
let blockchain = web3Blockchains.Blockchain.findByName(transaction.blockchain);
|
|
60010
60019
|
transaction.id = tx;
|
|
60011
60020
|
transaction.url = smartContractWallet && smartContractWallet.explorerUrlFor ? smartContractWallet.explorerUrlFor({ transaction }) : blockchain.explorerUrlFor({ transaction });
|
|
60012
60021
|
if (transaction.sent) transaction.sent(transaction);
|
|
60013
|
-
|
|
60014
|
-
|
|
60015
|
-
|
|
60016
|
-
|
|
60017
|
-
|
|
60018
|
-
|
|
60019
|
-
|
|
60020
|
-
|
|
60021
|
-
|
|
60022
|
-
|
|
60023
|
-
|
|
60024
|
-
|
|
60025
|
-
|
|
60026
|
-
|
|
60027
|
-
|
|
60022
|
+
retrieveTransaction$1({ blockchain: transaction.blockchain, tx, smartContractWallet }).then((sentTransaction)=>{
|
|
60023
|
+
transaction.id = sentTransaction.hash || transaction.id;
|
|
60024
|
+
transaction.url = blockchain.explorerUrlFor({ transaction });
|
|
60025
|
+
transaction.nonce = sentTransaction.nonce || transactionCount;
|
|
60026
|
+
sentTransaction.wait(1).then(() => {
|
|
60027
|
+
transaction._succeeded = true;
|
|
60028
|
+
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
60029
|
+
}).catch((error)=>{
|
|
60030
|
+
if(error && error.code && error.code == 'TRANSACTION_REPLACED') {
|
|
60031
|
+
if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 1) {
|
|
60032
|
+
transaction.id = error.replacement.hash;
|
|
60033
|
+
transaction._succeeded = true;
|
|
60034
|
+
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
60035
|
+
} else if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 0) {
|
|
60036
|
+
transaction.id = error.replacement.hash;
|
|
60037
|
+
transaction._failed = true;
|
|
60038
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
60039
|
+
}
|
|
60040
|
+
} else {
|
|
60028
60041
|
transaction._failed = true;
|
|
60029
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
60042
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
60030
60043
|
}
|
|
60031
|
-
}
|
|
60032
|
-
transaction._failed = true;
|
|
60033
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
60034
|
-
}
|
|
60044
|
+
});
|
|
60035
60045
|
});
|
|
60036
60046
|
} else {
|
|
60037
60047
|
throw('Submitting transaction failed!')
|
package/dist/umd/index.js
CHANGED
|
@@ -1014,12 +1014,21 @@
|
|
|
1014
1014
|
}
|
|
1015
1015
|
|
|
1016
1016
|
async transactionCount() {
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1017
|
+
let transactionCount;
|
|
1018
|
+
let jsonResult = await fetch(`https://safe-transaction-${transactionApiBlockchainNames[blockchain]}.safe.global/api/v1/safes/${this.address}/`)
|
|
1019
|
+
.then((response) => response.json())
|
|
1020
|
+
.catch((error) => { console.error('Error:', error); });
|
|
1021
|
+
if(jsonResult && jsonResult.nonce) {
|
|
1022
|
+
transactionCount = jsonResult.nonce;
|
|
1023
|
+
} else {
|
|
1024
|
+
transactionCount = parseInt((await web3Client.request({
|
|
1025
|
+
blockchain: this.blockchain,
|
|
1026
|
+
address: this.address,
|
|
1027
|
+
api: [{"inputs":[],"name":"nonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],
|
|
1028
|
+
method: 'nonce',
|
|
1029
|
+
})).toString(), 10);
|
|
1030
|
+
}
|
|
1031
|
+
return transactionCount
|
|
1023
1032
|
}
|
|
1024
1033
|
|
|
1025
1034
|
async retrieveTransaction({ blockchain, tx }) {
|
|
@@ -1097,34 +1106,35 @@
|
|
|
1097
1106
|
const smartContractWallet = await getSmartContractWallet(transaction.blockchain, transaction.from);
|
|
1098
1107
|
const transactionCount = smartContractWallet ? await smartContractWallet.transactionCount() : await web3Client.request({ blockchain: transaction.blockchain, method: 'transactionCount', address: transaction.from });
|
|
1099
1108
|
transaction.nonce = transactionCount;
|
|
1100
|
-
await submit$2({ transaction, wallet }).then(
|
|
1109
|
+
await submit$2({ transaction, wallet }).then((tx)=>{
|
|
1101
1110
|
if (tx) {
|
|
1102
1111
|
let blockchain = web3Blockchains.Blockchain.findByName(transaction.blockchain);
|
|
1103
1112
|
transaction.id = tx;
|
|
1104
1113
|
transaction.url = smartContractWallet && smartContractWallet.explorerUrlFor ? smartContractWallet.explorerUrlFor({ transaction }) : blockchain.explorerUrlFor({ transaction });
|
|
1105
1114
|
if (transaction.sent) transaction.sent(transaction);
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1115
|
+
retrieveTransaction$1({ blockchain: transaction.blockchain, tx, smartContractWallet }).then((sentTransaction)=>{
|
|
1116
|
+
transaction.id = sentTransaction.hash || transaction.id;
|
|
1117
|
+
transaction.url = blockchain.explorerUrlFor({ transaction });
|
|
1118
|
+
transaction.nonce = sentTransaction.nonce || transactionCount;
|
|
1119
|
+
sentTransaction.wait(1).then(() => {
|
|
1120
|
+
transaction._succeeded = true;
|
|
1121
|
+
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
1122
|
+
}).catch((error)=>{
|
|
1123
|
+
if(error && error.code && error.code == 'TRANSACTION_REPLACED') {
|
|
1124
|
+
if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 1) {
|
|
1125
|
+
transaction.id = error.replacement.hash;
|
|
1126
|
+
transaction._succeeded = true;
|
|
1127
|
+
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
1128
|
+
} else if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 0) {
|
|
1129
|
+
transaction.id = error.replacement.hash;
|
|
1130
|
+
transaction._failed = true;
|
|
1131
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
1132
|
+
}
|
|
1133
|
+
} else {
|
|
1121
1134
|
transaction._failed = true;
|
|
1122
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
1135
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
1123
1136
|
}
|
|
1124
|
-
}
|
|
1125
|
-
transaction._failed = true;
|
|
1126
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
1127
|
-
}
|
|
1137
|
+
});
|
|
1128
1138
|
});
|
|
1129
1139
|
} else {
|
|
1130
1140
|
throw('Submitting transaction failed!')
|
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.4",
|
|
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",
|