@otoplo/wallet-common 0.1.14 → 0.2.0
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/index.js +555 -579
- package/dist/index.js.map +1 -1
- package/dist/types/persistence/datastore/db.d.ts +5 -3
- package/dist/types/persistence/datastore/db.d.ts.map +1 -1
- package/dist/types/persistence/wallet-db.d.ts +10 -18
- package/dist/types/persistence/wallet-db.d.ts.map +1 -1
- package/dist/types/services/asset.d.ts +5 -9
- package/dist/types/services/asset.d.ts.map +1 -1
- package/dist/types/services/cache.d.ts +4 -2
- package/dist/types/services/cache.d.ts.map +1 -1
- package/dist/types/services/wallet.d.ts +2 -1
- package/dist/types/services/wallet.d.ts.map +1 -1
- package/dist/types/state/hooks.d.ts +2 -1
- package/dist/types/state/hooks.d.ts.map +1 -1
- package/dist/types/state/slices/market.d.ts +54 -0
- package/dist/types/state/slices/market.d.ts.map +1 -0
- package/dist/types/state/slices/status.d.ts +0 -27
- package/dist/types/state/slices/status.d.ts.map +1 -1
- package/dist/types/state/slices/wallet.d.ts +21 -220
- package/dist/types/state/slices/wallet.d.ts.map +1 -1
- package/dist/types/state/store.d.ts +3 -0
- package/dist/types/state/store.d.ts.map +1 -1
- package/dist/types/types/db.types.d.ts +16 -11
- package/dist/types/types/db.types.d.ts.map +1 -1
- package/dist/types/types/wallet.types.d.ts +39 -14
- package/dist/types/types/wallet.types.d.ts.map +1 -1
- package/dist/types/utils/asset.d.ts +3 -6
- package/dist/types/utils/asset.d.ts.map +1 -1
- package/dist/types/utils/common.d.ts +0 -1
- package/dist/types/utils/common.d.ts.map +1 -1
- package/dist/types/utils/enums.d.ts +0 -4
- package/dist/types/utils/enums.d.ts.map +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/index.d.ts.map +1 -1
- package/dist/types/utils/{price.d.ts → market.d.ts} +19 -13
- package/dist/types/utils/market.d.ts.map +1 -0
- package/package.json +5 -6
- package/src/persistence/datastore/db.ts +5 -3
- package/src/persistence/wallet-db.ts +28 -28
- package/src/services/asset.ts +69 -162
- package/src/services/cache.ts +12 -2
- package/src/services/wallet.ts +23 -21
- package/src/state/hooks.ts +3 -1
- package/src/state/slices/market.ts +47 -0
- package/src/state/slices/status.ts +2 -31
- package/src/state/slices/wallet.ts +8 -13
- package/src/state/store.ts +3 -0
- package/src/types/db.types.ts +17 -12
- package/src/types/wallet.types.ts +40 -16
- package/src/utils/asset.ts +12 -52
- package/src/utils/common.ts +0 -6
- package/src/utils/enums.ts +0 -5
- package/src/utils/index.ts +1 -1
- package/src/utils/market.ts +97 -0
- package/dist/types/utils/price.d.ts.map +0 -1
- package/src/utils/price.ts +0 -46
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
-
import { Account,
|
|
2
|
+
import { Account, Balance, SessionInfo, VaultInfo } from '../../types';
|
|
3
3
|
interface AddSessionPayload {
|
|
4
4
|
accountId: number;
|
|
5
5
|
sessionInfo: SessionInfo;
|
|
@@ -17,6 +17,7 @@ export interface WalletState {
|
|
|
17
17
|
initLoad: boolean;
|
|
18
18
|
txUpdateTrigger: number;
|
|
19
19
|
nftsUpdateTrigger: number;
|
|
20
|
+
tokensUpdateTrigger: number;
|
|
20
21
|
}
|
|
21
22
|
export declare const walletActions: import('@reduxjs/toolkit').CaseReducerActions<{
|
|
22
23
|
setInitLoad: (state: {
|
|
@@ -37,12 +38,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
37
38
|
unconfirmed: string | number;
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
|
-
tokens: {
|
|
41
|
-
accountId: number;
|
|
42
|
-
tokenIdHex: string;
|
|
43
|
-
type: import('../..').AssetType;
|
|
44
|
-
addedTime: number;
|
|
45
|
-
}[];
|
|
46
41
|
sessions: {
|
|
47
42
|
[x: string]: {
|
|
48
43
|
details: {
|
|
@@ -76,6 +71,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
76
71
|
initLoad: boolean;
|
|
77
72
|
txUpdateTrigger: number;
|
|
78
73
|
nftsUpdateTrigger: number;
|
|
74
|
+
tokensUpdateTrigger: number;
|
|
79
75
|
}, action: PayloadAction<boolean>) => void;
|
|
80
76
|
setSelectedAccount: (state: {
|
|
81
77
|
isAuthorized: boolean;
|
|
@@ -95,12 +91,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
95
91
|
unconfirmed: string | number;
|
|
96
92
|
};
|
|
97
93
|
};
|
|
98
|
-
tokens: {
|
|
99
|
-
accountId: number;
|
|
100
|
-
tokenIdHex: string;
|
|
101
|
-
type: import('../..').AssetType;
|
|
102
|
-
addedTime: number;
|
|
103
|
-
}[];
|
|
104
94
|
sessions: {
|
|
105
95
|
[x: string]: {
|
|
106
96
|
details: {
|
|
@@ -134,6 +124,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
134
124
|
initLoad: boolean;
|
|
135
125
|
txUpdateTrigger: number;
|
|
136
126
|
nftsUpdateTrigger: number;
|
|
127
|
+
tokensUpdateTrigger: number;
|
|
137
128
|
}, action: PayloadAction<number>) => void;
|
|
138
129
|
setSync: (state: {
|
|
139
130
|
isAuthorized: boolean;
|
|
@@ -153,12 +144,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
153
144
|
unconfirmed: string | number;
|
|
154
145
|
};
|
|
155
146
|
};
|
|
156
|
-
tokens: {
|
|
157
|
-
accountId: number;
|
|
158
|
-
tokenIdHex: string;
|
|
159
|
-
type: import('../..').AssetType;
|
|
160
|
-
addedTime: number;
|
|
161
|
-
}[];
|
|
162
147
|
sessions: {
|
|
163
148
|
[x: string]: {
|
|
164
149
|
details: {
|
|
@@ -192,6 +177,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
192
177
|
initLoad: boolean;
|
|
193
178
|
txUpdateTrigger: number;
|
|
194
179
|
nftsUpdateTrigger: number;
|
|
180
|
+
tokensUpdateTrigger: number;
|
|
195
181
|
}, action: PayloadAction<boolean>) => void;
|
|
196
182
|
setVault: (state: {
|
|
197
183
|
isAuthorized: boolean;
|
|
@@ -211,12 +197,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
211
197
|
unconfirmed: string | number;
|
|
212
198
|
};
|
|
213
199
|
};
|
|
214
|
-
tokens: {
|
|
215
|
-
accountId: number;
|
|
216
|
-
tokenIdHex: string;
|
|
217
|
-
type: import('../..').AssetType;
|
|
218
|
-
addedTime: number;
|
|
219
|
-
}[];
|
|
220
200
|
sessions: {
|
|
221
201
|
[x: string]: {
|
|
222
202
|
details: {
|
|
@@ -250,6 +230,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
250
230
|
initLoad: boolean;
|
|
251
231
|
txUpdateTrigger: number;
|
|
252
232
|
nftsUpdateTrigger: number;
|
|
233
|
+
tokensUpdateTrigger: number;
|
|
253
234
|
}, action: PayloadAction<VaultInfo>) => void;
|
|
254
235
|
setVaultBalance: (state: {
|
|
255
236
|
isAuthorized: boolean;
|
|
@@ -269,12 +250,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
269
250
|
unconfirmed: string | number;
|
|
270
251
|
};
|
|
271
252
|
};
|
|
272
|
-
tokens: {
|
|
273
|
-
accountId: number;
|
|
274
|
-
tokenIdHex: string;
|
|
275
|
-
type: import('../..').AssetType;
|
|
276
|
-
addedTime: number;
|
|
277
|
-
}[];
|
|
278
253
|
sessions: {
|
|
279
254
|
[x: string]: {
|
|
280
255
|
details: {
|
|
@@ -308,6 +283,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
308
283
|
initLoad: boolean;
|
|
309
284
|
txUpdateTrigger: number;
|
|
310
285
|
nftsUpdateTrigger: number;
|
|
286
|
+
tokensUpdateTrigger: number;
|
|
311
287
|
}, action: PayloadAction<{
|
|
312
288
|
address: string;
|
|
313
289
|
balance: Balance;
|
|
@@ -330,12 +306,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
330
306
|
unconfirmed: string | number;
|
|
331
307
|
};
|
|
332
308
|
};
|
|
333
|
-
tokens: {
|
|
334
|
-
accountId: number;
|
|
335
|
-
tokenIdHex: string;
|
|
336
|
-
type: import('../..').AssetType;
|
|
337
|
-
addedTime: number;
|
|
338
|
-
}[];
|
|
339
309
|
sessions: {
|
|
340
310
|
[x: string]: {
|
|
341
311
|
details: {
|
|
@@ -369,6 +339,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
369
339
|
initLoad: boolean;
|
|
370
340
|
txUpdateTrigger: number;
|
|
371
341
|
nftsUpdateTrigger: number;
|
|
342
|
+
tokensUpdateTrigger: number;
|
|
372
343
|
}, action: PayloadAction<Account>) => void;
|
|
373
344
|
setMainAddress: (state: {
|
|
374
345
|
isAuthorized: boolean;
|
|
@@ -388,12 +359,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
388
359
|
unconfirmed: string | number;
|
|
389
360
|
};
|
|
390
361
|
};
|
|
391
|
-
tokens: {
|
|
392
|
-
accountId: number;
|
|
393
|
-
tokenIdHex: string;
|
|
394
|
-
type: import('../..').AssetType;
|
|
395
|
-
addedTime: number;
|
|
396
|
-
}[];
|
|
397
362
|
sessions: {
|
|
398
363
|
[x: string]: {
|
|
399
364
|
details: {
|
|
@@ -427,6 +392,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
427
392
|
initLoad: boolean;
|
|
428
393
|
txUpdateTrigger: number;
|
|
429
394
|
nftsUpdateTrigger: number;
|
|
395
|
+
tokensUpdateTrigger: number;
|
|
430
396
|
}, action: PayloadAction<string>) => void;
|
|
431
397
|
setAccountBalance: (state: {
|
|
432
398
|
isAuthorized: boolean;
|
|
@@ -446,12 +412,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
446
412
|
unconfirmed: string | number;
|
|
447
413
|
};
|
|
448
414
|
};
|
|
449
|
-
tokens: {
|
|
450
|
-
accountId: number;
|
|
451
|
-
tokenIdHex: string;
|
|
452
|
-
type: import('../..').AssetType;
|
|
453
|
-
addedTime: number;
|
|
454
|
-
}[];
|
|
455
415
|
sessions: {
|
|
456
416
|
[x: string]: {
|
|
457
417
|
details: {
|
|
@@ -485,6 +445,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
485
445
|
initLoad: boolean;
|
|
486
446
|
txUpdateTrigger: number;
|
|
487
447
|
nftsUpdateTrigger: number;
|
|
448
|
+
tokensUpdateTrigger: number;
|
|
488
449
|
}, action: PayloadAction<{
|
|
489
450
|
id: number;
|
|
490
451
|
balance: Balance;
|
|
@@ -508,12 +469,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
508
469
|
unconfirmed: string | number;
|
|
509
470
|
};
|
|
510
471
|
};
|
|
511
|
-
tokens: {
|
|
512
|
-
accountId: number;
|
|
513
|
-
tokenIdHex: string;
|
|
514
|
-
type: import('../..').AssetType;
|
|
515
|
-
addedTime: number;
|
|
516
|
-
}[];
|
|
517
472
|
sessions: {
|
|
518
473
|
[x: string]: {
|
|
519
474
|
details: {
|
|
@@ -547,133 +502,12 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
547
502
|
initLoad: boolean;
|
|
548
503
|
txUpdateTrigger: number;
|
|
549
504
|
nftsUpdateTrigger: number;
|
|
505
|
+
tokensUpdateTrigger: number;
|
|
550
506
|
}, action: PayloadAction<{
|
|
551
507
|
id: number;
|
|
552
508
|
name: string;
|
|
553
509
|
}>) => void;
|
|
554
|
-
|
|
555
|
-
isAuthorized: boolean;
|
|
556
|
-
selectedAccount: number;
|
|
557
|
-
accounts: {
|
|
558
|
-
[x: number]: {
|
|
559
|
-
id: number;
|
|
560
|
-
name: string;
|
|
561
|
-
address: string;
|
|
562
|
-
balance: {
|
|
563
|
-
confirmed: string | number;
|
|
564
|
-
unconfirmed: string | number;
|
|
565
|
-
};
|
|
566
|
-
tokensBalance: {
|
|
567
|
-
[x: string]: {
|
|
568
|
-
confirmed: string | number;
|
|
569
|
-
unconfirmed: string | number;
|
|
570
|
-
};
|
|
571
|
-
};
|
|
572
|
-
tokens: {
|
|
573
|
-
accountId: number;
|
|
574
|
-
tokenIdHex: string;
|
|
575
|
-
type: import('../..').AssetType;
|
|
576
|
-
addedTime: number;
|
|
577
|
-
}[];
|
|
578
|
-
sessions: {
|
|
579
|
-
[x: string]: {
|
|
580
|
-
details: {
|
|
581
|
-
version: string;
|
|
582
|
-
relayUrl: string;
|
|
583
|
-
secret: string;
|
|
584
|
-
sessionId: string;
|
|
585
|
-
};
|
|
586
|
-
appInfo: {
|
|
587
|
-
name: string;
|
|
588
|
-
url: string;
|
|
589
|
-
description?: string | undefined;
|
|
590
|
-
icon?: string | undefined;
|
|
591
|
-
};
|
|
592
|
-
};
|
|
593
|
-
};
|
|
594
|
-
};
|
|
595
|
-
};
|
|
596
|
-
vaults: {
|
|
597
|
-
[x: string]: {
|
|
598
|
-
address: string;
|
|
599
|
-
balance: {
|
|
600
|
-
confirmed: string | number;
|
|
601
|
-
unconfirmed: string | number;
|
|
602
|
-
};
|
|
603
|
-
block: number;
|
|
604
|
-
index: number;
|
|
605
|
-
};
|
|
606
|
-
};
|
|
607
|
-
sync: boolean;
|
|
608
|
-
initLoad: boolean;
|
|
609
|
-
txUpdateTrigger: number;
|
|
610
|
-
nftsUpdateTrigger: number;
|
|
611
|
-
}, action: PayloadAction<{
|
|
612
|
-
id: number;
|
|
613
|
-
assets: AssetEntity[];
|
|
614
|
-
}>) => void;
|
|
615
|
-
addToken: (state: {
|
|
616
|
-
isAuthorized: boolean;
|
|
617
|
-
selectedAccount: number;
|
|
618
|
-
accounts: {
|
|
619
|
-
[x: number]: {
|
|
620
|
-
id: number;
|
|
621
|
-
name: string;
|
|
622
|
-
address: string;
|
|
623
|
-
balance: {
|
|
624
|
-
confirmed: string | number;
|
|
625
|
-
unconfirmed: string | number;
|
|
626
|
-
};
|
|
627
|
-
tokensBalance: {
|
|
628
|
-
[x: string]: {
|
|
629
|
-
confirmed: string | number;
|
|
630
|
-
unconfirmed: string | number;
|
|
631
|
-
};
|
|
632
|
-
};
|
|
633
|
-
tokens: {
|
|
634
|
-
accountId: number;
|
|
635
|
-
tokenIdHex: string;
|
|
636
|
-
type: import('../..').AssetType;
|
|
637
|
-
addedTime: number;
|
|
638
|
-
}[];
|
|
639
|
-
sessions: {
|
|
640
|
-
[x: string]: {
|
|
641
|
-
details: {
|
|
642
|
-
version: string;
|
|
643
|
-
relayUrl: string;
|
|
644
|
-
secret: string;
|
|
645
|
-
sessionId: string;
|
|
646
|
-
};
|
|
647
|
-
appInfo: {
|
|
648
|
-
name: string;
|
|
649
|
-
url: string;
|
|
650
|
-
description?: string | undefined;
|
|
651
|
-
icon?: string | undefined;
|
|
652
|
-
};
|
|
653
|
-
};
|
|
654
|
-
};
|
|
655
|
-
};
|
|
656
|
-
};
|
|
657
|
-
vaults: {
|
|
658
|
-
[x: string]: {
|
|
659
|
-
address: string;
|
|
660
|
-
balance: {
|
|
661
|
-
confirmed: string | number;
|
|
662
|
-
unconfirmed: string | number;
|
|
663
|
-
};
|
|
664
|
-
block: number;
|
|
665
|
-
index: number;
|
|
666
|
-
};
|
|
667
|
-
};
|
|
668
|
-
sync: boolean;
|
|
669
|
-
initLoad: boolean;
|
|
670
|
-
txUpdateTrigger: number;
|
|
671
|
-
nftsUpdateTrigger: number;
|
|
672
|
-
}, action: PayloadAction<{
|
|
673
|
-
id: number;
|
|
674
|
-
asset: AssetEntity;
|
|
675
|
-
}>) => void;
|
|
676
|
-
removeToken: (state: {
|
|
510
|
+
refreshTxs: (state: {
|
|
677
511
|
isAuthorized: boolean;
|
|
678
512
|
selectedAccount: number;
|
|
679
513
|
accounts: {
|
|
@@ -691,12 +525,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
691
525
|
unconfirmed: string | number;
|
|
692
526
|
};
|
|
693
527
|
};
|
|
694
|
-
tokens: {
|
|
695
|
-
accountId: number;
|
|
696
|
-
tokenIdHex: string;
|
|
697
|
-
type: import('../..').AssetType;
|
|
698
|
-
addedTime: number;
|
|
699
|
-
}[];
|
|
700
528
|
sessions: {
|
|
701
529
|
[x: string]: {
|
|
702
530
|
details: {
|
|
@@ -730,11 +558,9 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
730
558
|
initLoad: boolean;
|
|
731
559
|
txUpdateTrigger: number;
|
|
732
560
|
nftsUpdateTrigger: number;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
}>) => void;
|
|
737
|
-
refreshTxs: (state: {
|
|
561
|
+
tokensUpdateTrigger: number;
|
|
562
|
+
}) => void;
|
|
563
|
+
refreshNfts: (state: {
|
|
738
564
|
isAuthorized: boolean;
|
|
739
565
|
selectedAccount: number;
|
|
740
566
|
accounts: {
|
|
@@ -752,12 +578,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
752
578
|
unconfirmed: string | number;
|
|
753
579
|
};
|
|
754
580
|
};
|
|
755
|
-
tokens: {
|
|
756
|
-
accountId: number;
|
|
757
|
-
tokenIdHex: string;
|
|
758
|
-
type: import('../..').AssetType;
|
|
759
|
-
addedTime: number;
|
|
760
|
-
}[];
|
|
761
581
|
sessions: {
|
|
762
582
|
[x: string]: {
|
|
763
583
|
details: {
|
|
@@ -791,8 +611,9 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
791
611
|
initLoad: boolean;
|
|
792
612
|
txUpdateTrigger: number;
|
|
793
613
|
nftsUpdateTrigger: number;
|
|
614
|
+
tokensUpdateTrigger: number;
|
|
794
615
|
}) => void;
|
|
795
|
-
|
|
616
|
+
refreshTokens: (state: {
|
|
796
617
|
isAuthorized: boolean;
|
|
797
618
|
selectedAccount: number;
|
|
798
619
|
accounts: {
|
|
@@ -810,12 +631,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
810
631
|
unconfirmed: string | number;
|
|
811
632
|
};
|
|
812
633
|
};
|
|
813
|
-
tokens: {
|
|
814
|
-
accountId: number;
|
|
815
|
-
tokenIdHex: string;
|
|
816
|
-
type: import('../..').AssetType;
|
|
817
|
-
addedTime: number;
|
|
818
|
-
}[];
|
|
819
634
|
sessions: {
|
|
820
635
|
[x: string]: {
|
|
821
636
|
details: {
|
|
@@ -849,6 +664,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
849
664
|
initLoad: boolean;
|
|
850
665
|
txUpdateTrigger: number;
|
|
851
666
|
nftsUpdateTrigger: number;
|
|
667
|
+
tokensUpdateTrigger: number;
|
|
852
668
|
}) => void;
|
|
853
669
|
addSession(state: {
|
|
854
670
|
isAuthorized: boolean;
|
|
@@ -868,12 +684,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
868
684
|
unconfirmed: string | number;
|
|
869
685
|
};
|
|
870
686
|
};
|
|
871
|
-
tokens: {
|
|
872
|
-
accountId: number;
|
|
873
|
-
tokenIdHex: string;
|
|
874
|
-
type: import('../..').AssetType;
|
|
875
|
-
addedTime: number;
|
|
876
|
-
}[];
|
|
877
687
|
sessions: {
|
|
878
688
|
[x: string]: {
|
|
879
689
|
details: {
|
|
@@ -907,6 +717,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
907
717
|
initLoad: boolean;
|
|
908
718
|
txUpdateTrigger: number;
|
|
909
719
|
nftsUpdateTrigger: number;
|
|
720
|
+
tokensUpdateTrigger: number;
|
|
910
721
|
}, action: PayloadAction<AddSessionPayload>): void;
|
|
911
722
|
removeSession(state: {
|
|
912
723
|
isAuthorized: boolean;
|
|
@@ -926,12 +737,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
926
737
|
unconfirmed: string | number;
|
|
927
738
|
};
|
|
928
739
|
};
|
|
929
|
-
tokens: {
|
|
930
|
-
accountId: number;
|
|
931
|
-
tokenIdHex: string;
|
|
932
|
-
type: import('../..').AssetType;
|
|
933
|
-
addedTime: number;
|
|
934
|
-
}[];
|
|
935
740
|
sessions: {
|
|
936
741
|
[x: string]: {
|
|
937
742
|
details: {
|
|
@@ -965,6 +770,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
965
770
|
initLoad: boolean;
|
|
966
771
|
txUpdateTrigger: number;
|
|
967
772
|
nftsUpdateTrigger: number;
|
|
773
|
+
tokensUpdateTrigger: number;
|
|
968
774
|
}, action: PayloadAction<RemoveSessionPayload>): void;
|
|
969
775
|
clearSessions(state: {
|
|
970
776
|
isAuthorized: boolean;
|
|
@@ -984,12 +790,6 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
984
790
|
unconfirmed: string | number;
|
|
985
791
|
};
|
|
986
792
|
};
|
|
987
|
-
tokens: {
|
|
988
|
-
accountId: number;
|
|
989
|
-
tokenIdHex: string;
|
|
990
|
-
type: import('../..').AssetType;
|
|
991
|
-
addedTime: number;
|
|
992
|
-
}[];
|
|
993
793
|
sessions: {
|
|
994
794
|
[x: string]: {
|
|
995
795
|
details: {
|
|
@@ -1023,6 +823,7 @@ export declare const walletActions: import('@reduxjs/toolkit').CaseReducerAction
|
|
|
1023
823
|
initLoad: boolean;
|
|
1024
824
|
txUpdateTrigger: number;
|
|
1025
825
|
nftsUpdateTrigger: number;
|
|
826
|
+
tokensUpdateTrigger: number;
|
|
1026
827
|
}, action: PayloadAction<{
|
|
1027
828
|
accountId: number;
|
|
1028
829
|
}>): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../../../src/state/slices/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,M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AAE,CAAC;YAMrB,CAAC;AACjD,eAAO,MAAM,aAAa,sCAAsB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { authReducer } from './slices/auth';
|
|
2
2
|
import { dappModalReducer } from './slices/dapp';
|
|
3
3
|
import { loaderReducer } from './slices/loader';
|
|
4
|
+
import { marketReducer } from './slices/market';
|
|
4
5
|
import { notificationsReducer } from './slices/notifications';
|
|
5
6
|
import { statusReducer } from './slices/status';
|
|
6
7
|
import { walletReducer } from './slices/wallet';
|
|
@@ -11,6 +12,7 @@ export declare const sharedReducers: {
|
|
|
11
12
|
wallet: import('redux').Reducer<import('./slices').WalletState>;
|
|
12
13
|
auth: import('redux').Reducer<import('./slices').AuthState>;
|
|
13
14
|
notifications: import('redux').Reducer<import('./slices').NotificationsState>;
|
|
15
|
+
market: import('redux').Reducer<import('./slices/market').MarketState>;
|
|
14
16
|
};
|
|
15
17
|
export type SharedState = {
|
|
16
18
|
loader: ReturnType<typeof loaderReducer>;
|
|
@@ -19,5 +21,6 @@ export type SharedState = {
|
|
|
19
21
|
wallet: ReturnType<typeof walletReducer>;
|
|
20
22
|
auth: ReturnType<typeof authReducer>;
|
|
21
23
|
notifications: ReturnType<typeof notificationsReducer>;
|
|
24
|
+
market: ReturnType<typeof marketReducer>;
|
|
22
25
|
};
|
|
23
26
|
//# sourceMappingURL=store.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/state/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/state/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IACzC,IAAI,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;IAC1C,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IACzC,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;IACzC,IAAI,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IACrC,aAAa,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;IACvD,MAAM,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;CAC1C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AccountType
|
|
2
|
-
import { Balance } from './wallet.types';
|
|
1
|
+
import { AccountType } from '../utils/enums';
|
|
2
|
+
import { Balance, AssetType } from './wallet.types';
|
|
3
3
|
export interface AssetMovement {
|
|
4
4
|
address: string;
|
|
5
5
|
nexaAmount: string;
|
|
@@ -37,6 +37,12 @@ export interface AssetTransactionEntity {
|
|
|
37
37
|
txIdem: string;
|
|
38
38
|
time: number;
|
|
39
39
|
}
|
|
40
|
+
export interface AssetEntity {
|
|
41
|
+
accountId: number;
|
|
42
|
+
tokenIdHex: string;
|
|
43
|
+
type: AssetType;
|
|
44
|
+
addedTime: number;
|
|
45
|
+
}
|
|
40
46
|
export interface TokenEntity {
|
|
41
47
|
token: string;
|
|
42
48
|
tokenIdHex: string;
|
|
@@ -44,14 +50,19 @@ export interface TokenEntity {
|
|
|
44
50
|
ticker: string;
|
|
45
51
|
iconUrl: string;
|
|
46
52
|
decimals: number;
|
|
47
|
-
|
|
53
|
+
parent: string;
|
|
48
54
|
}
|
|
49
55
|
export interface NftEntity {
|
|
50
56
|
token: string;
|
|
51
57
|
tokenIdHex: string;
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
name: string;
|
|
59
|
+
parent: string;
|
|
54
60
|
collection: string;
|
|
61
|
+
series: string;
|
|
62
|
+
author: string;
|
|
63
|
+
public: string;
|
|
64
|
+
front: string;
|
|
65
|
+
back: string;
|
|
55
66
|
}
|
|
56
67
|
export interface SessionEntity {
|
|
57
68
|
sessionId: string;
|
|
@@ -79,12 +90,6 @@ export interface AccountEntity {
|
|
|
79
90
|
balance: string;
|
|
80
91
|
tokensBalance: string;
|
|
81
92
|
}
|
|
82
|
-
export interface AssetEntity {
|
|
83
|
-
accountId: number;
|
|
84
|
-
tokenIdHex: string;
|
|
85
|
-
type: AssetType;
|
|
86
|
-
addedTime: number;
|
|
87
|
-
}
|
|
88
93
|
export interface AddressDTO {
|
|
89
94
|
address: string;
|
|
90
95
|
space: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.types.d.ts","sourceRoot":"","sources":["../../../src/types/db.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"db.types.d.ts","sourceRoot":"","sources":["../../../src/types/db.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,E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ACvB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { DAppInfo, SessionDetails } from 'wallet-comms-sdk';
|
|
2
|
-
import { AssetEntity } from './db.types';
|
|
3
2
|
import { AccountType, KeySpace } from '../utils/enums';
|
|
4
3
|
export interface KeyPath {
|
|
5
4
|
account: AccountType;
|
|
@@ -16,17 +15,12 @@ export interface Balance {
|
|
|
16
15
|
confirmed: string | number;
|
|
17
16
|
unconfirmed: string | number;
|
|
18
17
|
}
|
|
19
|
-
export interface Price {
|
|
20
|
-
value: number;
|
|
21
|
-
change: number;
|
|
22
|
-
}
|
|
23
18
|
export interface Account {
|
|
24
19
|
id: number;
|
|
25
20
|
name: string;
|
|
26
21
|
address: string;
|
|
27
22
|
balance: Balance;
|
|
28
23
|
tokensBalance: Record<string, Balance>;
|
|
29
|
-
tokens: AssetEntity[];
|
|
30
24
|
sessions: Record<string, SessionInfo>;
|
|
31
25
|
}
|
|
32
26
|
export interface VaultInfo {
|
|
@@ -35,20 +29,51 @@ export interface VaultInfo {
|
|
|
35
29
|
block: number;
|
|
36
30
|
index: number;
|
|
37
31
|
}
|
|
38
|
-
export interface NftPreview {
|
|
39
|
-
infoJson: string;
|
|
40
|
-
image: string;
|
|
41
|
-
}
|
|
42
32
|
export interface SessionInfo {
|
|
43
33
|
details: SessionDetails;
|
|
44
34
|
appInfo: DAppInfo;
|
|
45
35
|
}
|
|
46
|
-
export interface
|
|
36
|
+
export interface AssetBase {
|
|
47
37
|
token: string;
|
|
48
38
|
tokenIdHex: string;
|
|
39
|
+
parent: string;
|
|
40
|
+
}
|
|
41
|
+
export interface TokenAsset {
|
|
42
|
+
name: string;
|
|
43
|
+
ticker: string;
|
|
44
|
+
iconUrl: string;
|
|
49
45
|
decimals: number;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
}
|
|
47
|
+
export interface NFTAsset {
|
|
48
|
+
name: string;
|
|
49
|
+
series: string;
|
|
50
|
+
collection: string;
|
|
51
|
+
author: string;
|
|
52
|
+
public: string;
|
|
53
|
+
front: string;
|
|
54
|
+
back: string;
|
|
55
|
+
}
|
|
56
|
+
export type AssetType = 'token' | 'nft';
|
|
57
|
+
export type AssetInfo = (AssetBase & {
|
|
58
|
+
type: 'token';
|
|
59
|
+
data: TokenAsset;
|
|
60
|
+
}) | (AssetBase & {
|
|
61
|
+
type: 'nft';
|
|
62
|
+
data: NFTAsset;
|
|
63
|
+
});
|
|
64
|
+
export interface MarketData {
|
|
65
|
+
id: string;
|
|
66
|
+
name: string;
|
|
67
|
+
symbol: string;
|
|
68
|
+
image: string;
|
|
69
|
+
price: number;
|
|
70
|
+
priceChange?: number | null;
|
|
71
|
+
priceChangePercentage?: number | null;
|
|
72
|
+
marketCap?: number | null;
|
|
73
|
+
fdv?: number | null;
|
|
74
|
+
circSupply?: number | null;
|
|
75
|
+
totalSupply?: number | null;
|
|
76
|
+
maxSupply?: number | null;
|
|
77
|
+
totalVolume?: number | null;
|
|
53
78
|
}
|
|
54
79
|
//# sourceMappingURL=wallet.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.types.d.ts","sourceRoot":"","sources":["../../../src/types/wallet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"wallet.types.d.ts","sourceRoot":"","sources":["../../../src/types/wallet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,U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