@@ -18,6 +18,7 @@ import voters from '__mocks__/models/voters';
18
18
import FunctionKey from 'constants/functionKey' ;
19
19
20
20
import { proposals } from '__mocks__/models/proposals' ;
21
+ import { usdt } from '__mocks__/models/tokens' ;
21
22
import type { Token , VToken } from 'types' ;
22
23
import type { Address } from 'viem' ;
23
24
import type { GetBalanceOfInput } from '../queries/getBalanceOf' ;
@@ -634,6 +635,111 @@ export const useGetAccountPerformanceHistory = vi.fn(() =>
634
635
} ) ,
635
636
) ;
636
637
638
+ export const getAccountTransactionHistory = vi . fn ( async ( ) => ( {
639
+ transactions : [
640
+ {
641
+ accountAddress : '0x3d759121234cd36F8124C21aFe1c6852d2bEd848' ,
642
+ amountCents : new BigNumber ( '2406931.018168454893468167206' ) ,
643
+ amountTokens : new BigNumber ( '24066181578079398.612862' ) ,
644
+ blockNumber : '41604850' ,
645
+ blockTimestamp : new Date ( '2024-08-23T04:17:09.000Z' ) ,
646
+ chainId : 97 ,
647
+ contractAddress : '0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c' ,
648
+ hash : '0xda13a0f45b10dabd21b863b6b602c6d8776edd4c6b10fe65a0881d491f468f35' ,
649
+ poolName : 'Metaverse' ,
650
+ token : usdt ,
651
+ txType : 'redeem' ,
652
+ } ,
653
+ {
654
+ accountAddress : '0x3d759121234cd36F8124C21aFe1c6852d2bEd848' ,
655
+ amountCents : new BigNumber ( '2401121.576132434220587935367386' ) ,
656
+ amountTokens : new BigNumber ( '24001813290985731.455439' ) ,
657
+ blockNumber : '41114054' ,
658
+ blockTimestamp : new Date ( '2024-08-06T02:18:03.000Z' ) ,
659
+ chainId : 97 ,
660
+ contractAddress : '0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c' ,
661
+ hash : '0xb0435b135762a7ca2ad7dccb9aa6c7f50237c6139b16a76348d6c64dfece110e' ,
662
+ poolName : 'Metaverse' ,
663
+ token : usdt ,
664
+ txType : 'mint' ,
665
+ } ,
666
+ {
667
+ accountAddress : '0x3d759121234cd36F8124C21aFe1c6852d2bEd848' ,
668
+ amountCents : new BigNumber ( '2401121.576132434220587935367386' ) ,
669
+ amountTokens : new BigNumber ( '24001813290985731.455439' ) ,
670
+ blockNumber : '41114053' ,
671
+ blockTimestamp : new Date ( '2024-08-05T02:18:03.000Z' ) ,
672
+ chainId : 97 ,
673
+ contractAddress : '0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c' ,
674
+ hash : '0xb0435b135762a7ca2ad7dccb9aa6c7f50237c6139b16a76348d6c64dfece110e' ,
675
+ poolName : 'Metaverse' ,
676
+ token : usdt ,
677
+ txType : 'borrow' ,
678
+ } ,
679
+ {
680
+ accountAddress : '0x3d759121234cd36F8124C21aFe1c6852d2bEd848' ,
681
+ amountCents : new BigNumber ( '2401121.576132434220587935367386' ) ,
682
+ amountTokens : new BigNumber ( '24001813290985731.455439' ) ,
683
+ blockNumber : '41114052' ,
684
+ blockTimestamp : new Date ( '2024-08-04T02:18:03.000Z' ) ,
685
+ chainId : 97 ,
686
+ contractAddress : '0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c' ,
687
+ hash : '0xb0435b135762a7ca2ad7dccb9aa6c7f50237c6139b16a76348d6c64dfece110e' ,
688
+ poolName : 'Metaverse' ,
689
+ token : usdt ,
690
+ txType : 'repay' ,
691
+ } ,
692
+ {
693
+ accountAddress : '0x3d759121234cd36F8124C21aFe1c6852d2bEd848' ,
694
+ amountCents : new BigNumber ( '2401121.576132434220587935367386' ) ,
695
+ amountTokens : new BigNumber ( '24001813290985731.455439' ) ,
696
+ blockNumber : '41114051' ,
697
+ blockTimestamp : new Date ( '2024-08-03T02:18:03.000Z' ) ,
698
+ chainId : 97 ,
699
+ contractAddress : '0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c' ,
700
+ hash : '0xb0435b135762a7ca2ad7dccb9aa6c7f50237c6139b16a76348d6c64dfece110e' ,
701
+ poolName : 'Metaverse' ,
702
+ token : usdt ,
703
+ txType : 'enter_market' ,
704
+ } ,
705
+ {
706
+ accountAddress : '0x3d759121234cd36F8124C21aFe1c6852d2bEd848' ,
707
+ amountCents : new BigNumber ( '2401121.576132434220587935367386' ) ,
708
+ amountTokens : new BigNumber ( '24001813290985731.455439' ) ,
709
+ blockNumber : '41114050' ,
710
+ blockTimestamp : new Date ( '2024-08-03T02:18:00.000Z' ) ,
711
+ chainId : 97 ,
712
+ contractAddress : '0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c' ,
713
+ hash : '0xb0435b135762a7ca2ad7dccb9aa6c7f50237c6139b16a76348d6c64dfece110e' ,
714
+ poolName : 'Metaverse' ,
715
+ token : usdt ,
716
+ txType : 'exit_market' ,
717
+ } ,
718
+ {
719
+ accountAddress : '0x3d759121234cd36F8124C21aFe1c6852d2bEd848' ,
720
+ amountCents : new BigNumber ( '0' ) ,
721
+ amountTokens : new BigNumber (
722
+ '115792089237316195423570985008687907853269984665640564039457584007913129639935' ,
723
+ ) ,
724
+ blockNumber : '41114008' ,
725
+ blockTimestamp : new Date ( '2024-08-02T02:18:00.000Z' ) ,
726
+ chainId : 97 ,
727
+ contractAddress : '0xA11c8D9DC9b66E209Ef60F0C8D969D3CD988782c' ,
728
+ hash : '0xb0435b135762a7ca2ad7dccb9aa6c7f50237c6139b16a76348d6c64dfece110e' ,
729
+ poolName : 'Metaverse' ,
730
+ token : usdt ,
731
+ txType : 'approve' ,
732
+ } ,
733
+ ] ,
734
+ count : 7 ,
735
+ } ) ) ;
736
+ export const useGetAccountTransactionHistory = vi . fn ( ( ) =>
737
+ useQuery ( {
738
+ queryKey : [ FunctionKey . GET_ACCOUNT_TRANSACTION_HISTORY ] ,
739
+ queryFn : getAccountTransactionHistory ,
740
+ } ) ,
741
+ ) ;
742
+
637
743
// Mutations
638
744
export const useApproveToken = vi . fn ( ( _variables : never , options ?: MutationObserverOptions ) =>
639
745
useMutation ( {
0 commit comments