@depay/web3-wallets-evm 18.1.8 → 18.1.10
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 +7 -18
- package/dist/esm/index.js +7 -18
- package/dist/umd/index.evm.js +7 -18
- package/dist/umd/index.js +7 -18
- package/package.json +1 -1
package/dist/esm/index.evm.js
CHANGED
|
@@ -169,6 +169,7 @@ const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
|
169
169
|
transaction.nonce = sentTransaction.nonce || transactionCount;
|
|
170
170
|
transaction.url = Blockchains.findByName(transaction.blockchain).explorerUrlFor({ transaction });
|
|
171
171
|
if (transaction.sent) transaction.sent(transaction);
|
|
172
|
+
|
|
172
173
|
retrieveConfirmedTransaction$2(sentTransaction).then(() => {
|
|
173
174
|
transaction._succeeded = true;
|
|
174
175
|
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
@@ -183,7 +184,7 @@ const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
|
183
184
|
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
184
185
|
} else if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 0) {
|
|
185
186
|
transaction._failed = true;
|
|
186
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
187
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
187
188
|
}
|
|
188
189
|
} else {
|
|
189
190
|
transaction._failed = true;
|
|
@@ -2004,8 +2005,7 @@ class WorldApp {
|
|
|
2004
2005
|
transaction.nonce = (await this.transactionCount({ blockchain: 'worldchain', address: transaction.from })).toString();
|
|
2005
2006
|
transaction.fromBlock = await request('worldchain://latestBlockNumber');
|
|
2006
2007
|
|
|
2007
|
-
MiniKit.subscribe(ResponseEvent.MiniAppSendTransaction, (payload
|
|
2008
|
-
console.log('payload', payload);
|
|
2008
|
+
MiniKit.subscribe(ResponseEvent.MiniAppSendTransaction, (payload)=> {
|
|
2009
2009
|
MiniKit.unsubscribe(ResponseEvent.MiniAppSendTransaction);
|
|
2010
2010
|
if (payload.status == "success") {
|
|
2011
2011
|
if (transaction.accepted) { transaction.accepted(); }
|
|
@@ -2020,7 +2020,7 @@ class WorldApp {
|
|
|
2020
2020
|
reject('Submitting transaction failed!');
|
|
2021
2021
|
}
|
|
2022
2022
|
});
|
|
2023
|
-
|
|
2023
|
+
MiniKit.commands.sendTransaction({
|
|
2024
2024
|
transaction: [
|
|
2025
2025
|
{
|
|
2026
2026
|
address: transaction.to,
|
|
@@ -2031,17 +2031,6 @@ class WorldApp {
|
|
|
2031
2031
|
],
|
|
2032
2032
|
permit2: [_optionalChain$1([transaction, 'access', _13 => _13.params, 'optionalAccess', _14 => _14.permit2])]
|
|
2033
2033
|
});
|
|
2034
|
-
MiniKit.commands.sendTransaction({
|
|
2035
|
-
transaction: [
|
|
2036
|
-
{
|
|
2037
|
-
address: transaction.to,
|
|
2038
|
-
abi: _optionalChain$1([transaction, 'access', _15 => _15.api, 'optionalAccess', _16 => _16.filter, 'call', _17 => _17((fragment)=>fragment.name === transaction.method && _optionalChain$1([fragment, 'optionalAccess', _18 => _18.inputs, 'optionalAccess', _19 => _19.length]) === _optionalChain$1([transaction, 'access', _20 => _20.params, 'optionalAccess', _21 => _21.args, 'optionalAccess', _22 => _22.length]))]),
|
|
2039
|
-
functionName: transaction.method,
|
|
2040
|
-
args: _optionalChain$1([transaction, 'access', _23 => _23.params, 'optionalAccess', _24 => _24.args])
|
|
2041
|
-
},
|
|
2042
|
-
],
|
|
2043
|
-
permit2: [_optionalChain$1([transaction, 'access', _25 => _25.params, 'optionalAccess', _26 => _26.permit2])]
|
|
2044
|
-
});
|
|
2045
2034
|
})
|
|
2046
2035
|
}
|
|
2047
2036
|
|
|
@@ -2062,8 +2051,8 @@ class WorldApp {
|
|
|
2062
2051
|
}).then((response)=>{
|
|
2063
2052
|
if(response.ok) {
|
|
2064
2053
|
response.json().then((transactionJSON)=>{
|
|
2065
|
-
if(_optionalChain$1([transactionJSON, 'optionalAccess',
|
|
2066
|
-
resolve(_optionalChain$1([transactionJSON, 'optionalAccess',
|
|
2054
|
+
if(_optionalChain$1([transactionJSON, 'optionalAccess', _15 => _15.external_id])) {
|
|
2055
|
+
resolve(_optionalChain$1([transactionJSON, 'optionalAccess', _16 => _16.external_id]));
|
|
2067
2056
|
} else {
|
|
2068
2057
|
resolve();
|
|
2069
2058
|
}
|
|
@@ -2159,7 +2148,7 @@ class WorldApp {
|
|
|
2159
2148
|
if(localStorage.getItem(STORAGE_KEY)) {
|
|
2160
2149
|
return localStorage.getItem(STORAGE_KEY)
|
|
2161
2150
|
}
|
|
2162
|
-
return (_optionalChain$1([window, 'access',
|
|
2151
|
+
return (_optionalChain$1([window, 'access', _17 => _17.MiniKit, 'access', _18 => _18.user, 'optionalAccess', _19 => _19.walletAddress]) || _optionalChain$1([MiniKit, 'access', _20 => _20.user, 'optionalAccess', _21 => _21.walletAddress]))
|
|
2163
2152
|
}
|
|
2164
2153
|
|
|
2165
2154
|
connect() {
|
package/dist/esm/index.js
CHANGED
|
@@ -442,6 +442,7 @@ const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
|
442
442
|
transaction.nonce = sentTransaction.nonce || transactionCount;
|
|
443
443
|
transaction.url = Blockchains.findByName(transaction.blockchain).explorerUrlFor({ transaction });
|
|
444
444
|
if (transaction.sent) transaction.sent(transaction);
|
|
445
|
+
|
|
445
446
|
retrieveConfirmedTransaction$2(sentTransaction).then(() => {
|
|
446
447
|
transaction._succeeded = true;
|
|
447
448
|
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
@@ -456,7 +457,7 @@ const sendTransaction$2 = async ({ transaction, wallet })=> {
|
|
|
456
457
|
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
457
458
|
} else if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 0) {
|
|
458
459
|
transaction._failed = true;
|
|
459
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
460
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
460
461
|
}
|
|
461
462
|
} else {
|
|
462
463
|
transaction._failed = true;
|
|
@@ -2605,8 +2606,7 @@ class WorldApp {
|
|
|
2605
2606
|
transaction.nonce = (await this.transactionCount({ blockchain: 'worldchain', address: transaction.from })).toString();
|
|
2606
2607
|
transaction.fromBlock = await request('worldchain://latestBlockNumber');
|
|
2607
2608
|
|
|
2608
|
-
MiniKit.subscribe(ResponseEvent.MiniAppSendTransaction, (payload
|
|
2609
|
-
console.log('payload', payload);
|
|
2609
|
+
MiniKit.subscribe(ResponseEvent.MiniAppSendTransaction, (payload)=> {
|
|
2610
2610
|
MiniKit.unsubscribe(ResponseEvent.MiniAppSendTransaction);
|
|
2611
2611
|
if (payload.status == "success") {
|
|
2612
2612
|
if (transaction.accepted) { transaction.accepted(); }
|
|
@@ -2621,7 +2621,7 @@ class WorldApp {
|
|
|
2621
2621
|
reject('Submitting transaction failed!');
|
|
2622
2622
|
}
|
|
2623
2623
|
});
|
|
2624
|
-
|
|
2624
|
+
MiniKit.commands.sendTransaction({
|
|
2625
2625
|
transaction: [
|
|
2626
2626
|
{
|
|
2627
2627
|
address: transaction.to,
|
|
@@ -2632,17 +2632,6 @@ class WorldApp {
|
|
|
2632
2632
|
],
|
|
2633
2633
|
permit2: [_optionalChain$1([transaction, 'access', _13 => _13.params, 'optionalAccess', _14 => _14.permit2])]
|
|
2634
2634
|
});
|
|
2635
|
-
MiniKit.commands.sendTransaction({
|
|
2636
|
-
transaction: [
|
|
2637
|
-
{
|
|
2638
|
-
address: transaction.to,
|
|
2639
|
-
abi: _optionalChain$1([transaction, 'access', _15 => _15.api, 'optionalAccess', _16 => _16.filter, 'call', _17 => _17((fragment)=>fragment.name === transaction.method && _optionalChain$1([fragment, 'optionalAccess', _18 => _18.inputs, 'optionalAccess', _19 => _19.length]) === _optionalChain$1([transaction, 'access', _20 => _20.params, 'optionalAccess', _21 => _21.args, 'optionalAccess', _22 => _22.length]))]),
|
|
2640
|
-
functionName: transaction.method,
|
|
2641
|
-
args: _optionalChain$1([transaction, 'access', _23 => _23.params, 'optionalAccess', _24 => _24.args])
|
|
2642
|
-
},
|
|
2643
|
-
],
|
|
2644
|
-
permit2: [_optionalChain$1([transaction, 'access', _25 => _25.params, 'optionalAccess', _26 => _26.permit2])]
|
|
2645
|
-
});
|
|
2646
2635
|
})
|
|
2647
2636
|
}
|
|
2648
2637
|
|
|
@@ -2663,8 +2652,8 @@ class WorldApp {
|
|
|
2663
2652
|
}).then((response)=>{
|
|
2664
2653
|
if(response.ok) {
|
|
2665
2654
|
response.json().then((transactionJSON)=>{
|
|
2666
|
-
if(_optionalChain$1([transactionJSON, 'optionalAccess',
|
|
2667
|
-
resolve(_optionalChain$1([transactionJSON, 'optionalAccess',
|
|
2655
|
+
if(_optionalChain$1([transactionJSON, 'optionalAccess', _15 => _15.external_id])) {
|
|
2656
|
+
resolve(_optionalChain$1([transactionJSON, 'optionalAccess', _16 => _16.external_id]));
|
|
2668
2657
|
} else {
|
|
2669
2658
|
resolve();
|
|
2670
2659
|
}
|
|
@@ -2760,7 +2749,7 @@ class WorldApp {
|
|
|
2760
2749
|
if(localStorage.getItem(STORAGE_KEY)) {
|
|
2761
2750
|
return localStorage.getItem(STORAGE_KEY)
|
|
2762
2751
|
}
|
|
2763
|
-
return (_optionalChain$1([window, 'access',
|
|
2752
|
+
return (_optionalChain$1([window, 'access', _17 => _17.MiniKit, 'access', _18 => _18.user, 'optionalAccess', _19 => _19.walletAddress]) || _optionalChain$1([MiniKit, 'access', _20 => _20.user, 'optionalAccess', _21 => _21.walletAddress]))
|
|
2764
2753
|
}
|
|
2765
2754
|
|
|
2766
2755
|
connect() {
|
package/dist/umd/index.evm.js
CHANGED
|
@@ -173,6 +173,7 @@
|
|
|
173
173
|
transaction.nonce = sentTransaction.nonce || transactionCount;
|
|
174
174
|
transaction.url = Blockchains__default['default'].findByName(transaction.blockchain).explorerUrlFor({ transaction });
|
|
175
175
|
if (transaction.sent) transaction.sent(transaction);
|
|
176
|
+
|
|
176
177
|
retrieveConfirmedTransaction$2(sentTransaction).then(() => {
|
|
177
178
|
transaction._succeeded = true;
|
|
178
179
|
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
@@ -187,7 +188,7 @@
|
|
|
187
188
|
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
188
189
|
} else if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 0) {
|
|
189
190
|
transaction._failed = true;
|
|
190
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
191
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
191
192
|
}
|
|
192
193
|
} else {
|
|
193
194
|
transaction._failed = true;
|
|
@@ -2008,8 +2009,7 @@
|
|
|
2008
2009
|
transaction.nonce = (await this.transactionCount({ blockchain: 'worldchain', address: transaction.from })).toString();
|
|
2009
2010
|
transaction.fromBlock = await web3ClientEvm.request('worldchain://latestBlockNumber');
|
|
2010
2011
|
|
|
2011
|
-
MiniKit.subscribe(ResponseEvent.MiniAppSendTransaction, (payload
|
|
2012
|
-
console.log('payload', payload);
|
|
2012
|
+
MiniKit.subscribe(ResponseEvent.MiniAppSendTransaction, (payload)=> {
|
|
2013
2013
|
MiniKit.unsubscribe(ResponseEvent.MiniAppSendTransaction);
|
|
2014
2014
|
if (payload.status == "success") {
|
|
2015
2015
|
if (transaction.accepted) { transaction.accepted(); }
|
|
@@ -2024,7 +2024,7 @@
|
|
|
2024
2024
|
reject('Submitting transaction failed!');
|
|
2025
2025
|
}
|
|
2026
2026
|
});
|
|
2027
|
-
|
|
2027
|
+
MiniKit.commands.sendTransaction({
|
|
2028
2028
|
transaction: [
|
|
2029
2029
|
{
|
|
2030
2030
|
address: transaction.to,
|
|
@@ -2035,17 +2035,6 @@
|
|
|
2035
2035
|
],
|
|
2036
2036
|
permit2: [_optionalChain$1([transaction, 'access', _13 => _13.params, 'optionalAccess', _14 => _14.permit2])]
|
|
2037
2037
|
});
|
|
2038
|
-
MiniKit.commands.sendTransaction({
|
|
2039
|
-
transaction: [
|
|
2040
|
-
{
|
|
2041
|
-
address: transaction.to,
|
|
2042
|
-
abi: _optionalChain$1([transaction, 'access', _15 => _15.api, 'optionalAccess', _16 => _16.filter, 'call', _17 => _17((fragment)=>fragment.name === transaction.method && _optionalChain$1([fragment, 'optionalAccess', _18 => _18.inputs, 'optionalAccess', _19 => _19.length]) === _optionalChain$1([transaction, 'access', _20 => _20.params, 'optionalAccess', _21 => _21.args, 'optionalAccess', _22 => _22.length]))]),
|
|
2043
|
-
functionName: transaction.method,
|
|
2044
|
-
args: _optionalChain$1([transaction, 'access', _23 => _23.params, 'optionalAccess', _24 => _24.args])
|
|
2045
|
-
},
|
|
2046
|
-
],
|
|
2047
|
-
permit2: [_optionalChain$1([transaction, 'access', _25 => _25.params, 'optionalAccess', _26 => _26.permit2])]
|
|
2048
|
-
});
|
|
2049
2038
|
})
|
|
2050
2039
|
}
|
|
2051
2040
|
|
|
@@ -2066,8 +2055,8 @@
|
|
|
2066
2055
|
}).then((response)=>{
|
|
2067
2056
|
if(response.ok) {
|
|
2068
2057
|
response.json().then((transactionJSON)=>{
|
|
2069
|
-
if(_optionalChain$1([transactionJSON, 'optionalAccess',
|
|
2070
|
-
resolve(_optionalChain$1([transactionJSON, 'optionalAccess',
|
|
2058
|
+
if(_optionalChain$1([transactionJSON, 'optionalAccess', _15 => _15.external_id])) {
|
|
2059
|
+
resolve(_optionalChain$1([transactionJSON, 'optionalAccess', _16 => _16.external_id]));
|
|
2071
2060
|
} else {
|
|
2072
2061
|
resolve();
|
|
2073
2062
|
}
|
|
@@ -2163,7 +2152,7 @@
|
|
|
2163
2152
|
if(localStorage.getItem(STORAGE_KEY)) {
|
|
2164
2153
|
return localStorage.getItem(STORAGE_KEY)
|
|
2165
2154
|
}
|
|
2166
|
-
return (_optionalChain$1([window, 'access',
|
|
2155
|
+
return (_optionalChain$1([window, 'access', _17 => _17.MiniKit, 'access', _18 => _18.user, 'optionalAccess', _19 => _19.walletAddress]) || _optionalChain$1([MiniKit, 'access', _20 => _20.user, 'optionalAccess', _21 => _21.walletAddress]))
|
|
2167
2156
|
}
|
|
2168
2157
|
|
|
2169
2158
|
connect() {
|
package/dist/umd/index.js
CHANGED
|
@@ -445,6 +445,7 @@
|
|
|
445
445
|
transaction.nonce = sentTransaction.nonce || transactionCount;
|
|
446
446
|
transaction.url = Blockchains__default['default'].findByName(transaction.blockchain).explorerUrlFor({ transaction });
|
|
447
447
|
if (transaction.sent) transaction.sent(transaction);
|
|
448
|
+
|
|
448
449
|
retrieveConfirmedTransaction$2(sentTransaction).then(() => {
|
|
449
450
|
transaction._succeeded = true;
|
|
450
451
|
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
@@ -459,7 +460,7 @@
|
|
|
459
460
|
if (transaction.succeeded) transaction.succeeded(transaction);
|
|
460
461
|
} else if(error.replacement && error.replacement.hash && error.receipt && error.receipt.status == 0) {
|
|
461
462
|
transaction._failed = true;
|
|
462
|
-
if(transaction.failed) transaction.failed(transaction, error);
|
|
463
|
+
if(transaction.failed) transaction.failed(transaction, error);
|
|
463
464
|
}
|
|
464
465
|
} else {
|
|
465
466
|
transaction._failed = true;
|
|
@@ -2608,8 +2609,7 @@
|
|
|
2608
2609
|
transaction.nonce = (await this.transactionCount({ blockchain: 'worldchain', address: transaction.from })).toString();
|
|
2609
2610
|
transaction.fromBlock = await web3Client.request('worldchain://latestBlockNumber');
|
|
2610
2611
|
|
|
2611
|
-
MiniKit.subscribe(ResponseEvent.MiniAppSendTransaction, (payload
|
|
2612
|
-
console.log('payload', payload);
|
|
2612
|
+
MiniKit.subscribe(ResponseEvent.MiniAppSendTransaction, (payload)=> {
|
|
2613
2613
|
MiniKit.unsubscribe(ResponseEvent.MiniAppSendTransaction);
|
|
2614
2614
|
if (payload.status == "success") {
|
|
2615
2615
|
if (transaction.accepted) { transaction.accepted(); }
|
|
@@ -2624,7 +2624,7 @@
|
|
|
2624
2624
|
reject('Submitting transaction failed!');
|
|
2625
2625
|
}
|
|
2626
2626
|
});
|
|
2627
|
-
|
|
2627
|
+
MiniKit.commands.sendTransaction({
|
|
2628
2628
|
transaction: [
|
|
2629
2629
|
{
|
|
2630
2630
|
address: transaction.to,
|
|
@@ -2635,17 +2635,6 @@
|
|
|
2635
2635
|
],
|
|
2636
2636
|
permit2: [_optionalChain$1([transaction, 'access', _13 => _13.params, 'optionalAccess', _14 => _14.permit2])]
|
|
2637
2637
|
});
|
|
2638
|
-
MiniKit.commands.sendTransaction({
|
|
2639
|
-
transaction: [
|
|
2640
|
-
{
|
|
2641
|
-
address: transaction.to,
|
|
2642
|
-
abi: _optionalChain$1([transaction, 'access', _15 => _15.api, 'optionalAccess', _16 => _16.filter, 'call', _17 => _17((fragment)=>fragment.name === transaction.method && _optionalChain$1([fragment, 'optionalAccess', _18 => _18.inputs, 'optionalAccess', _19 => _19.length]) === _optionalChain$1([transaction, 'access', _20 => _20.params, 'optionalAccess', _21 => _21.args, 'optionalAccess', _22 => _22.length]))]),
|
|
2643
|
-
functionName: transaction.method,
|
|
2644
|
-
args: _optionalChain$1([transaction, 'access', _23 => _23.params, 'optionalAccess', _24 => _24.args])
|
|
2645
|
-
},
|
|
2646
|
-
],
|
|
2647
|
-
permit2: [_optionalChain$1([transaction, 'access', _25 => _25.params, 'optionalAccess', _26 => _26.permit2])]
|
|
2648
|
-
});
|
|
2649
2638
|
})
|
|
2650
2639
|
}
|
|
2651
2640
|
|
|
@@ -2666,8 +2655,8 @@
|
|
|
2666
2655
|
}).then((response)=>{
|
|
2667
2656
|
if(response.ok) {
|
|
2668
2657
|
response.json().then((transactionJSON)=>{
|
|
2669
|
-
if(_optionalChain$1([transactionJSON, 'optionalAccess',
|
|
2670
|
-
resolve(_optionalChain$1([transactionJSON, 'optionalAccess',
|
|
2658
|
+
if(_optionalChain$1([transactionJSON, 'optionalAccess', _15 => _15.external_id])) {
|
|
2659
|
+
resolve(_optionalChain$1([transactionJSON, 'optionalAccess', _16 => _16.external_id]));
|
|
2671
2660
|
} else {
|
|
2672
2661
|
resolve();
|
|
2673
2662
|
}
|
|
@@ -2763,7 +2752,7 @@
|
|
|
2763
2752
|
if(localStorage.getItem(STORAGE_KEY)) {
|
|
2764
2753
|
return localStorage.getItem(STORAGE_KEY)
|
|
2765
2754
|
}
|
|
2766
|
-
return (_optionalChain$1([window, 'access',
|
|
2755
|
+
return (_optionalChain$1([window, 'access', _17 => _17.MiniKit, 'access', _18 => _18.user, 'optionalAccess', _19 => _19.walletAddress]) || _optionalChain$1([MiniKit, 'access', _20 => _20.user, 'optionalAccess', _21 => _21.walletAddress]))
|
|
2767
2756
|
}
|
|
2768
2757
|
|
|
2769
2758
|
connect() {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depay/web3-wallets-evm",
|
|
3
3
|
"moduleName": "Web3Wallets",
|
|
4
|
-
"version": "18.1.
|
|
4
|
+
"version": "18.1.10",
|
|
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",
|