astra-modal-test 1.0.0 → 1.0.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/astra-sdk.es.js +5 -4
- package/dist/astra-sdk.umd.js +734 -732
- package/dist/{ccip-Bpb4GlU6.mjs → ccip-CFEKJ3Ks.js} +1 -1
- package/dist/font/ClashDisplay-Variable.ttf +0 -0
- package/dist/font/ClashDisplay-Variable.woff +0 -0
- package/dist/font/ClashDisplay-Variable.woff2 +0 -0
- package/dist/{index-CEtKkuP2.mjs → index-BDeAs3SQ.js} +2 -2
- package/dist/{index-CbWGAz3l.mjs → index-C4tezYWF.js} +2 -2
- package/dist/{index-DRPxIWUd.mjs → index-CJ3Ye6uH.js} +2 -2
- package/dist/{index-h9_6XS0r.mjs → index-CnmhaFbj.js} +2 -2
- package/dist/{index-BTsa09iy.mjs → index-tp9lcU8A.js} +32901 -30185
- package/dist/{w3m-modal-R9m1z1SQ.mjs → w3m-modal-BVQPTRZq.js} +1 -1
- package/{eslint.config.js → eslint.config.mjs} +2 -0
- package/package.json +3 -2
- package/public/font/ClashDisplay-Variable.ttf +0 -0
- package/public/font/ClashDisplay-Variable.woff +0 -0
- package/public/font/ClashDisplay-Variable.woff2 +0 -0
- package/src/comps/AstraModal.jsx +17 -28
- package/src/comps/AstraModalLogo.jsx +10 -37
- package/src/comps/AstraNetwork.jsx +22 -5
- package/src/comps/ConnectButton.jsx +2 -3
- package/src/comps/ResultModal.jsx +12 -13
- package/src/comps/ToLightning.jsx +36 -48
- package/src/comps/ToToken.jsx +46 -60
- package/src/constants/contracts/abi/bridge.js +55 -20
- package/src/constants/contracts/abi/watcher.js +6 -92
- package/src/constants/contracts/index.js +4 -4
- package/src/hooks/useContract.js +14 -1
- package/src/index.jsx +41 -33
- package/src/main.jsx +4 -4
- package/dist/secp256k1-3OC5y4qp.mjs +0 -1578
- /package/dist/{hooks.module-BBZfodGH.mjs → hooks.module-BBZfodGH.js} +0 -0
|
@@ -26,6 +26,27 @@ export const HashedTimelock_ABI = [
|
|
|
26
26
|
"name": "ECDSAInvalidSignatureS",
|
|
27
27
|
"type": "error"
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
"inputs": [],
|
|
31
|
+
"name": "FailedCall",
|
|
32
|
+
"type": "error"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"inputs": [
|
|
36
|
+
{
|
|
37
|
+
"internalType": "uint256",
|
|
38
|
+
"name": "balance",
|
|
39
|
+
"type": "uint256"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"internalType": "uint256",
|
|
43
|
+
"name": "needed",
|
|
44
|
+
"type": "uint256"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"name": "InsufficientBalance",
|
|
48
|
+
"type": "error"
|
|
49
|
+
},
|
|
29
50
|
{
|
|
30
51
|
"inputs": [],
|
|
31
52
|
"name": "InvalidInitialization",
|
|
@@ -313,7 +334,7 @@ export const HashedTimelock_ABI = [
|
|
|
313
334
|
"type": "uint8"
|
|
314
335
|
}
|
|
315
336
|
],
|
|
316
|
-
"internalType": "struct
|
|
337
|
+
"internalType": "struct IHashedTimeLock.AssetInfo",
|
|
317
338
|
"name": "_assetInfo",
|
|
318
339
|
"type": "tuple"
|
|
319
340
|
}
|
|
@@ -366,7 +387,7 @@ export const HashedTimelock_ABI = [
|
|
|
366
387
|
"type": "bool"
|
|
367
388
|
}
|
|
368
389
|
],
|
|
369
|
-
"internalType": "struct
|
|
390
|
+
"internalType": "struct IHashedTimeLock.TokenInfo",
|
|
370
391
|
"name": "_tokenInfo",
|
|
371
392
|
"type": "tuple"
|
|
372
393
|
}
|
|
@@ -493,7 +514,7 @@ export const HashedTimelock_ABI = [
|
|
|
493
514
|
"type": "uint8"
|
|
494
515
|
}
|
|
495
516
|
],
|
|
496
|
-
"internalType": "struct
|
|
517
|
+
"internalType": "struct IHashedTimeLock.AssetInfo",
|
|
497
518
|
"name": "asset",
|
|
498
519
|
"type": "tuple"
|
|
499
520
|
}
|
|
@@ -574,7 +595,7 @@ export const HashedTimelock_ABI = [
|
|
|
574
595
|
"type": "uint8"
|
|
575
596
|
}
|
|
576
597
|
],
|
|
577
|
-
"internalType": "struct
|
|
598
|
+
"internalType": "struct IHashedTimeLock.HtlcContract",
|
|
578
599
|
"name": "htlc",
|
|
579
600
|
"type": "tuple"
|
|
580
601
|
}
|
|
@@ -655,7 +676,7 @@ export const HashedTimelock_ABI = [
|
|
|
655
676
|
"type": "uint8"
|
|
656
677
|
}
|
|
657
678
|
],
|
|
658
|
-
"internalType": "struct
|
|
679
|
+
"internalType": "struct IHashedTimeLock.HtlcContract",
|
|
659
680
|
"name": "htlc",
|
|
660
681
|
"type": "tuple"
|
|
661
682
|
}
|
|
@@ -726,9 +747,14 @@ export const HashedTimelock_ABI = [
|
|
|
726
747
|
"internalType": "address",
|
|
727
748
|
"name": "lspAddress",
|
|
728
749
|
"type": "address"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"internalType": "string",
|
|
753
|
+
"name": "url",
|
|
754
|
+
"type": "string"
|
|
729
755
|
}
|
|
730
756
|
],
|
|
731
|
-
"internalType": "struct
|
|
757
|
+
"internalType": "struct IHashedTimeLock.LspInfo",
|
|
732
758
|
"name": "lsp",
|
|
733
759
|
"type": "tuple"
|
|
734
760
|
}
|
|
@@ -762,9 +788,14 @@ export const HashedTimelock_ABI = [
|
|
|
762
788
|
"internalType": "address",
|
|
763
789
|
"name": "lspAddress",
|
|
764
790
|
"type": "address"
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
"internalType": "string",
|
|
794
|
+
"name": "url",
|
|
795
|
+
"type": "string"
|
|
765
796
|
}
|
|
766
797
|
],
|
|
767
|
-
"internalType": "struct
|
|
798
|
+
"internalType": "struct IHashedTimeLock.LspInfo",
|
|
768
799
|
"name": "lsp",
|
|
769
800
|
"type": "tuple"
|
|
770
801
|
}
|
|
@@ -820,7 +851,7 @@ export const HashedTimelock_ABI = [
|
|
|
820
851
|
"type": "bool"
|
|
821
852
|
}
|
|
822
853
|
],
|
|
823
|
-
"internalType": "struct
|
|
854
|
+
"internalType": "struct IHashedTimeLock.TokenInfo",
|
|
824
855
|
"name": "token",
|
|
825
856
|
"type": "tuple"
|
|
826
857
|
},
|
|
@@ -842,12 +873,12 @@ export const HashedTimelock_ABI = [
|
|
|
842
873
|
"type": "uint8"
|
|
843
874
|
}
|
|
844
875
|
],
|
|
845
|
-
"internalType": "struct
|
|
876
|
+
"internalType": "struct IHashedTimeLock.AssetInfo",
|
|
846
877
|
"name": "asset",
|
|
847
878
|
"type": "tuple"
|
|
848
879
|
}
|
|
849
880
|
],
|
|
850
|
-
"internalType": "struct
|
|
881
|
+
"internalType": "struct IHashedTimeLock.Pair",
|
|
851
882
|
"name": "pair",
|
|
852
883
|
"type": "tuple"
|
|
853
884
|
}
|
|
@@ -890,7 +921,7 @@ export const HashedTimelock_ABI = [
|
|
|
890
921
|
"type": "bool"
|
|
891
922
|
}
|
|
892
923
|
],
|
|
893
|
-
"internalType": "struct
|
|
924
|
+
"internalType": "struct IHashedTimeLock.TokenInfo",
|
|
894
925
|
"name": "token",
|
|
895
926
|
"type": "tuple"
|
|
896
927
|
},
|
|
@@ -912,12 +943,12 @@ export const HashedTimelock_ABI = [
|
|
|
912
943
|
"type": "uint8"
|
|
913
944
|
}
|
|
914
945
|
],
|
|
915
|
-
"internalType": "struct
|
|
946
|
+
"internalType": "struct IHashedTimeLock.AssetInfo",
|
|
916
947
|
"name": "asset",
|
|
917
948
|
"type": "tuple"
|
|
918
949
|
}
|
|
919
950
|
],
|
|
920
|
-
"internalType": "struct
|
|
951
|
+
"internalType": "struct IHashedTimeLock.Pair",
|
|
921
952
|
"name": "pair",
|
|
922
953
|
"type": "tuple"
|
|
923
954
|
}
|
|
@@ -971,7 +1002,7 @@ export const HashedTimelock_ABI = [
|
|
|
971
1002
|
"type": "bool"
|
|
972
1003
|
}
|
|
973
1004
|
],
|
|
974
|
-
"internalType": "struct
|
|
1005
|
+
"internalType": "struct IHashedTimeLock.TokenInfo",
|
|
975
1006
|
"name": "token",
|
|
976
1007
|
"type": "tuple"
|
|
977
1008
|
}
|
|
@@ -1083,6 +1114,11 @@ export const HashedTimelock_ABI = [
|
|
|
1083
1114
|
"internalType": "bytes32",
|
|
1084
1115
|
"name": "_nodePubkey",
|
|
1085
1116
|
"type": "bytes32"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"internalType": "string",
|
|
1120
|
+
"name": "_url",
|
|
1121
|
+
"type": "string"
|
|
1086
1122
|
}
|
|
1087
1123
|
],
|
|
1088
1124
|
"name": "registerLsp",
|
|
@@ -1158,11 +1194,6 @@ export const HashedTimelock_ABI = [
|
|
|
1158
1194
|
},
|
|
1159
1195
|
{
|
|
1160
1196
|
"inputs": [
|
|
1161
|
-
{
|
|
1162
|
-
"internalType": "address",
|
|
1163
|
-
"name": "_signer",
|
|
1164
|
-
"type": "address"
|
|
1165
|
-
},
|
|
1166
1197
|
{
|
|
1167
1198
|
"internalType": "bytes32",
|
|
1168
1199
|
"name": "_hashLock",
|
|
@@ -1173,6 +1204,11 @@ export const HashedTimelock_ABI = [
|
|
|
1173
1204
|
"name": "_from",
|
|
1174
1205
|
"type": "address"
|
|
1175
1206
|
},
|
|
1207
|
+
{
|
|
1208
|
+
"internalType": "uint256",
|
|
1209
|
+
"name": "chainId",
|
|
1210
|
+
"type": "uint256"
|
|
1211
|
+
},
|
|
1176
1212
|
{
|
|
1177
1213
|
"internalType": "address",
|
|
1178
1214
|
"name": "_token",
|
|
@@ -1243,4 +1279,3 @@ export const HashedTimelock_ABI = [
|
|
|
1243
1279
|
}
|
|
1244
1280
|
]
|
|
1245
1281
|
|
|
1246
|
-
|
|
@@ -121,7 +121,7 @@ export const WATHER_ABI = [
|
|
|
121
121
|
"name": "astraBridge",
|
|
122
122
|
"outputs": [
|
|
123
123
|
{
|
|
124
|
-
"internalType": "contract
|
|
124
|
+
"internalType": "contract IHashedTimeLock",
|
|
125
125
|
"name": "",
|
|
126
126
|
"type": "address"
|
|
127
127
|
}
|
|
@@ -158,7 +158,7 @@ export const WATHER_ABI = [
|
|
|
158
158
|
"type": "bool"
|
|
159
159
|
}
|
|
160
160
|
],
|
|
161
|
-
"internalType": "struct
|
|
161
|
+
"internalType": "struct IHashedTimeLock.TokenInfo",
|
|
162
162
|
"name": "token",
|
|
163
163
|
"type": "tuple"
|
|
164
164
|
},
|
|
@@ -180,12 +180,12 @@ export const WATHER_ABI = [
|
|
|
180
180
|
"type": "uint8"
|
|
181
181
|
}
|
|
182
182
|
],
|
|
183
|
-
"internalType": "struct
|
|
183
|
+
"internalType": "struct IHashedTimeLock.AssetInfo",
|
|
184
184
|
"name": "asset",
|
|
185
185
|
"type": "tuple"
|
|
186
186
|
}
|
|
187
187
|
],
|
|
188
|
-
"internalType": "struct
|
|
188
|
+
"internalType": "struct IHashedTimeLock.Pair[]",
|
|
189
189
|
"name": "pairs",
|
|
190
190
|
"type": "tuple[]"
|
|
191
191
|
}
|
|
@@ -222,7 +222,7 @@ export const WATHER_ABI = [
|
|
|
222
222
|
"name": "getBridge",
|
|
223
223
|
"outputs": [
|
|
224
224
|
{
|
|
225
|
-
"internalType": "contract
|
|
225
|
+
"internalType": "contract IHashedTimeLock",
|
|
226
226
|
"name": "",
|
|
227
227
|
"type": "address"
|
|
228
228
|
}
|
|
@@ -308,7 +308,7 @@ export const WATHER_ABI = [
|
|
|
308
308
|
"type": "uint8"
|
|
309
309
|
}
|
|
310
310
|
],
|
|
311
|
-
"internalType": "struct
|
|
311
|
+
"internalType": "struct IHashedTimeLock.HtlcContract[]",
|
|
312
312
|
"name": "result",
|
|
313
313
|
"type": "tuple[]"
|
|
314
314
|
}
|
|
@@ -316,92 +316,6 @@ export const WATHER_ABI = [
|
|
|
316
316
|
"stateMutability": "view",
|
|
317
317
|
"type": "function"
|
|
318
318
|
},
|
|
319
|
-
{
|
|
320
|
-
"inputs": [
|
|
321
|
-
{
|
|
322
|
-
"internalType": "uint256",
|
|
323
|
-
"name": "page",
|
|
324
|
-
"type": "uint256"
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"internalType": "uint256",
|
|
328
|
-
"name": "size",
|
|
329
|
-
"type": "uint256"
|
|
330
|
-
}
|
|
331
|
-
],
|
|
332
|
-
"name": "getContracts",
|
|
333
|
-
"outputs": [
|
|
334
|
-
{
|
|
335
|
-
"components": [
|
|
336
|
-
{
|
|
337
|
-
"internalType": "bytes32",
|
|
338
|
-
"name": "hashlock",
|
|
339
|
-
"type": "bytes32"
|
|
340
|
-
},
|
|
341
|
-
{
|
|
342
|
-
"internalType": "address payable",
|
|
343
|
-
"name": "sender",
|
|
344
|
-
"type": "address"
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
"internalType": "address payable",
|
|
348
|
-
"name": "receiver",
|
|
349
|
-
"type": "address"
|
|
350
|
-
},
|
|
351
|
-
{
|
|
352
|
-
"internalType": "address",
|
|
353
|
-
"name": "token",
|
|
354
|
-
"type": "address"
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
"internalType": "uint256",
|
|
358
|
-
"name": "amount",
|
|
359
|
-
"type": "uint256"
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
"internalType": "uint256",
|
|
363
|
-
"name": "fee",
|
|
364
|
-
"type": "uint256"
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
"internalType": "uint256",
|
|
368
|
-
"name": "createTime",
|
|
369
|
-
"type": "uint256"
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
"internalType": "uint256",
|
|
373
|
-
"name": "timelock",
|
|
374
|
-
"type": "uint256"
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
"internalType": "bool",
|
|
378
|
-
"name": "toLightning",
|
|
379
|
-
"type": "bool"
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
"internalType": "bytes32",
|
|
383
|
-
"name": "preimage",
|
|
384
|
-
"type": "bytes32"
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
"internalType": "address payable",
|
|
388
|
-
"name": "watcher",
|
|
389
|
-
"type": "address"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
"internalType": "uint8",
|
|
393
|
-
"name": "status",
|
|
394
|
-
"type": "uint8"
|
|
395
|
-
}
|
|
396
|
-
],
|
|
397
|
-
"internalType": "struct IAstraBridge.HtlcContract[]",
|
|
398
|
-
"name": "",
|
|
399
|
-
"type": "tuple[]"
|
|
400
|
-
}
|
|
401
|
-
],
|
|
402
|
-
"stateMutability": "view",
|
|
403
|
-
"type": "function"
|
|
404
|
-
},
|
|
405
319
|
{
|
|
406
320
|
"inputs": [
|
|
407
321
|
{
|
|
@@ -7,11 +7,11 @@ const contractConfig = {
|
|
|
7
7
|
11155111: {
|
|
8
8
|
RPC_URL: ['https://eth-sepolia.g.alchemy.com/v2/ClvXGqSMvZ6nEb_G5ekJGsZwNdsp72oz', 'https://eth-sepolia.public.blastapi.io', 'https://sepolia.drpc.org', 'https://1rpc.io/sepolia'],
|
|
9
9
|
Bridge: {
|
|
10
|
-
address: "
|
|
10
|
+
address: "0x8306a6AE9B0F539eA2dA538dC504262515B3Bf55",
|
|
11
11
|
abi: HashedTimelock_ABI,
|
|
12
12
|
},
|
|
13
13
|
Watcher: {
|
|
14
|
-
address: "
|
|
14
|
+
address: "0x59254Ef66ee8fe58a70Da597d116014505B55b9E",
|
|
15
15
|
abi: WATHER_ABI,
|
|
16
16
|
},
|
|
17
17
|
USDT: {
|
|
@@ -21,11 +21,11 @@ const contractConfig = {
|
|
|
21
21
|
84532: {
|
|
22
22
|
RPC_URL: ["https://sepolia.base.org"],
|
|
23
23
|
Bridge: {
|
|
24
|
-
address: "
|
|
24
|
+
address: "0xbE27c8BFe54DAcc76107A367A69a8D546E14cCAa",
|
|
25
25
|
abi: HashedTimelock_ABI,
|
|
26
26
|
},
|
|
27
27
|
Watcher: {
|
|
28
|
-
address: "
|
|
28
|
+
address: "0xe0cDA7bfCa108Fa64F2F47Afd48F73FA1CBbEF82",
|
|
29
29
|
abi: WATHER_ABI,
|
|
30
30
|
},
|
|
31
31
|
USDT: {
|
package/src/hooks/useContract.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
useReadContract,
|
|
5
5
|
useWriteContract,
|
|
6
6
|
useConfig,
|
|
7
|
+
usePublicClient
|
|
7
8
|
} from "wagmi";
|
|
8
9
|
import { waitForTransactionReceipt, readContract } from "@wagmi/core";
|
|
9
10
|
import { useMemo, useCallback } from "react";
|
|
@@ -13,6 +14,7 @@ import { formatAssetByDecimal } from "../utils";
|
|
|
13
14
|
export function useBridgeContract(account) {
|
|
14
15
|
|
|
15
16
|
const chainId = useChainId();
|
|
17
|
+
const publicClient = usePublicClient();
|
|
16
18
|
const config = contractConfig[chainId];
|
|
17
19
|
|
|
18
20
|
const { currentAssetPair } = useStore();
|
|
@@ -41,7 +43,8 @@ export function useBridgeContract(account) {
|
|
|
41
43
|
...tokenContractConfig,
|
|
42
44
|
functionName: "allowance",
|
|
43
45
|
args: [account?.address, config?.Bridge?.address],
|
|
44
|
-
enabled: !!account?.address
|
|
46
|
+
enabled: !!account?.address,
|
|
47
|
+
scopeKey: "allowance"
|
|
45
48
|
});
|
|
46
49
|
|
|
47
50
|
const formatAllowance = useMemo(() => {
|
|
@@ -92,6 +95,16 @@ export function useBridgeContract(account) {
|
|
|
92
95
|
throw new Error('Invoice already exists.');
|
|
93
96
|
}
|
|
94
97
|
|
|
98
|
+
const depositGas = await publicClient.estimateContractGas({
|
|
99
|
+
...bridgeContractConfig,
|
|
100
|
+
functionName: "deposit",
|
|
101
|
+
args: [hashlock, fromAddr, toAddr, tokenAddr, BigInt(amount), timeLock, fee, toLightning, signature],
|
|
102
|
+
value: fee,
|
|
103
|
+
account: account?.address,
|
|
104
|
+
})
|
|
105
|
+
console.log('depositGas', depositGas)
|
|
106
|
+
|
|
107
|
+
|
|
95
108
|
const tx = await writeContractAsync({
|
|
96
109
|
...bridgeContractConfig,
|
|
97
110
|
functionName: "deposit",
|
package/src/index.jsx
CHANGED
|
@@ -11,6 +11,7 @@ import { themeConfig } from "./theme.js";
|
|
|
11
11
|
import { MODAL_DISPLAY_TYPE } from "./constants/index.js";
|
|
12
12
|
import IconEthNetwork from "./assets/network/eth.png";
|
|
13
13
|
import IconBaseNetwork from "./assets/network/base.png";
|
|
14
|
+
import { useLayoutEffect, useRef } from "react";
|
|
14
15
|
const defaultMetadata = {
|
|
15
16
|
name: "Lnfi",
|
|
16
17
|
description: "Lnfi",
|
|
@@ -18,17 +19,18 @@ const defaultMetadata = {
|
|
|
18
19
|
icons: ["https://avatars.githubusercontent.com/u/37784886"],
|
|
19
20
|
};
|
|
20
21
|
// 3. Set the networks
|
|
21
|
-
|
|
22
|
+
|
|
22
23
|
let wagmiAdapter = null;
|
|
23
|
-
|
|
24
|
+
|
|
24
25
|
export default function AstraProvider({
|
|
25
26
|
projectId,
|
|
26
27
|
metadata,
|
|
27
28
|
adapter,
|
|
28
29
|
children,
|
|
29
30
|
}) {
|
|
31
|
+
const networks = [sepolia, baseSepolia];
|
|
30
32
|
const queryClient = new QueryClient();
|
|
31
|
-
|
|
33
|
+
const appKit = useRef(null)
|
|
32
34
|
if (!wagmiAdapter) {
|
|
33
35
|
wagmiAdapter = adapter
|
|
34
36
|
? adapter
|
|
@@ -38,40 +40,46 @@ export default function AstraProvider({
|
|
|
38
40
|
ssr: false,
|
|
39
41
|
});
|
|
40
42
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
43
|
+
useLayoutEffect(() => {
|
|
44
|
+
if (!appKit.current) {
|
|
45
|
+
appKit.current = createAppKit({
|
|
46
|
+
adapters: [wagmiAdapter],
|
|
47
|
+
networks,
|
|
48
|
+
chainImages: {
|
|
49
|
+
[sepolia.id]: IconEthNetwork,
|
|
50
|
+
[baseSepolia.id]: IconBaseNetwork,
|
|
51
|
+
},
|
|
52
|
+
debug: false,
|
|
53
|
+
themeMode: "dark",
|
|
54
|
+
projectId: projectId,
|
|
55
|
+
metadata: metadata || defaultMetadata,
|
|
56
|
+
featuredWalletIds: [
|
|
57
|
+
"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96",
|
|
58
|
+
"971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709",
|
|
59
|
+
"8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a9bb99d4",
|
|
60
|
+
],
|
|
61
|
+
features: {
|
|
62
|
+
analytics: false,
|
|
63
|
+
swaps: false,
|
|
64
|
+
onramp: false,
|
|
65
|
+
socials: [],
|
|
66
|
+
email: false,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}, [])
|
|
70
71
|
|
|
71
72
|
return (
|
|
72
73
|
<>
|
|
73
74
|
<>
|
|
74
|
-
<ConfigProvider
|
|
75
|
+
<ConfigProvider
|
|
76
|
+
theme={{
|
|
77
|
+
algorithm: theme.darkAlgorithm,
|
|
78
|
+
cssVar: false,
|
|
79
|
+
...themeConfig,
|
|
80
|
+
}}
|
|
81
|
+
prefixCls="astra"
|
|
82
|
+
>
|
|
75
83
|
<WagmiProvider config={wagmiAdapter.wagmiConfig}>
|
|
76
84
|
<QueryClientProvider client={queryClient}>
|
|
77
85
|
<>{children}</>
|
package/src/main.jsx
CHANGED
|
@@ -17,9 +17,9 @@ createRoot(document.getElementById("root")).render(
|
|
|
17
17
|
onClick={() => {
|
|
18
18
|
astraReceive({
|
|
19
19
|
assetId:
|
|
20
|
-
"
|
|
20
|
+
"5bd129d549bd68cad64f2c2db141732a523e4546a49662c390e8c14294aa7e84",
|
|
21
21
|
invoice:
|
|
22
|
-
"
|
|
22
|
+
"lnbcrt20u1pnh896jpp5sr79r4ntfv3549fpgnvvkhp39lq3q7kcsmmzcfn0vmkrw5k3qwxqdy0f3hxv6fmv9ehxet5f9zr5dtzvscnywtyx56rjcnyxcuxxctyxc6xvvnrxfjxyvf5xymnxvnpx5erxef5x56rvcf58ymrvvnrxvunqefcvvcngv3ex3skzdm98q6rkctdda6kuap6xgcrqwscqzzsxqrrssrzjqg3zz9zaagxqxan9fqzr6k7yvf900uf26m0z7c2g0rf55raupqclpavzrhe0apgmd5qqqqlgqqqqqqgq2qsp5gn5atk95vp88gcf3m9hz0php05ldla6fh7w9ghxq5fymv39zf74q9qxpqysgqlgjuytf3h534htpkzlv8zvv0xa3cjh6xzd6gsjm40aqkddm4cz6jyw7v5wacrjwpyzl6t5p8ah7dyzauueq66vz8mn5wcascamtgwkqpwcvgn2",
|
|
23
23
|
});
|
|
24
24
|
}}
|
|
25
25
|
>
|
|
@@ -29,8 +29,8 @@ createRoot(document.getElementById("root")).render(
|
|
|
29
29
|
onClick={() => {
|
|
30
30
|
astraSend({
|
|
31
31
|
assetId:
|
|
32
|
-
"
|
|
33
|
-
amount:
|
|
32
|
+
"5bd129d549bd68cad64f2c2db141732a523e4546a49662c390e8c14294aa7e84",
|
|
33
|
+
amount: 1000,
|
|
34
34
|
});
|
|
35
35
|
}}
|
|
36
36
|
>
|