@@ -46,24 +46,24 @@ import {
4646const ALCHEMY_GAS_SPONSOR_API_KEY = getEnv ( 'ALCHEMY_GAS_SPONSOR_API_KEY' ) ;
4747const ALCHEMY_GAS_SPONSOR_POLICY_ID = getEnv ( 'ALCHEMY_GAS_SPONSOR_POLICY_ID' ) ;
4848
49- const SWAP_AMOUNT = 80 ;
50- const SWAP_TOKEN_IN_ADDRESS = '0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed' ; // DEGEN
51- const SWAP_TOKEN_IN_DECIMALS = 18 ;
49+ // const SWAP_AMOUNT = 80;
50+ // const SWAP_TOKEN_IN_ADDRESS = '0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed'; // DEGEN
51+ // const SWAP_TOKEN_IN_DECIMALS = 18;
5252
5353// const SWAP_AMOUNT = 0.0003;
5454// const SWAP_TOKEN_IN_ADDRESS = '0x4200000000000000000000000000000000000006'; // WETH
5555// const SWAP_TOKEN_IN_DECIMALS = 18;
5656
57- // const SWAP_AMOUNT = 0.1;
58- // const SWAP_TOKEN_IN_ADDRESS = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'; // USDC
59- // const SWAP_TOKEN_IN_DECIMALS = 6;
57+ const SWAP_AMOUNT = 0.1 ;
58+ const SWAP_TOKEN_IN_ADDRESS = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ; // USDC
59+ const SWAP_TOKEN_IN_DECIMALS = 6 ;
6060
61- const SWAP_TOKEN_OUT_ADDRESS = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913' ; // USDC
62- const SWAP_TOKEN_OUT_DECIMALS = 6 ;
61+ // const SWAP_TOKEN_OUT_ADDRESS = '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'; // USDC
62+ // const SWAP_TOKEN_OUT_DECIMALS = 6;
6363// const SWAP_TOKEN_OUT_ADDRESS = '0x4200000000000000000000000000000000000006'; // WETH
6464// const SWAP_TOKEN_OUT_DECIMALS = 18;
65- // const SWAP_TOKEN_OUT_ADDRESS = '0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed'; // DEGEN
66- // const SWAP_TOKEN_OUT_DECIMALS = 18;
65+ const SWAP_TOKEN_OUT_ADDRESS = '0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed' ; // DEGEN
66+ const SWAP_TOKEN_OUT_DECIMALS = 18 ;
6767
6868const RPC_URL = BASE_RPC_URL ;
6969const CHAIN_ID = 8453 ;
@@ -478,6 +478,7 @@ describe('Uniswap Swap Ability E2E Tests', () => {
478478
479479 const precheckResult = await uniswapSwapAbilityClient . precheck (
480480 {
481+ action : AbilityAction . Swap ,
481482 rpcUrlForUniswap : RPC_URL ,
482483 signedUniswapQuote : {
483484 quote : signedUniswapQuote . quote ,
@@ -514,9 +515,11 @@ describe('Uniswap Swap Ability E2E Tests', () => {
514515
515516 // Verify the result is properly populated
516517 expect ( precheckResult . result ) . toBeDefined ( ) ;
517- expect ( BigInt ( precheckResult . result ! . nativeTokenBalance ) ) . toBeGreaterThan ( 0n ) ;
518+ expect ( precheckResult . result ! . nativeTokenBalance ) . toBeDefined ( ) ;
519+ expect ( BigInt ( precheckResult . result ! . nativeTokenBalance as string ) ) . toBeGreaterThan ( 0n ) ;
518520 expect ( precheckResult . result ! . tokenInAddress ) . toBe ( SWAP_TOKEN_IN_ADDRESS ) ;
519- expect ( BigInt ( precheckResult . result ! . tokenInBalance ) ) . toBeGreaterThan ( 0n ) ;
521+ expect ( precheckResult . result ! . tokenInBalance ) . toBeDefined ( ) ;
522+ expect ( BigInt ( precheckResult . result ! . tokenInBalance as string ) ) . toBeGreaterThan ( 0n ) ;
520523 expect ( BigInt ( precheckResult . result ! . currentTokenInAllowanceForSpender ) ) . toBeGreaterThan ( 0n ) ;
521524 expect ( precheckResult . result ! . spenderAddress ) . toBe ( signedUniswapQuote . quote . to ) ;
522525 } ) ;
@@ -713,6 +716,7 @@ describe('Uniswap Swap Ability E2E Tests', () => {
713716
714717 const precheckResult = await uniswapSwapAbilityClient . precheck (
715718 {
719+ action : AbilityAction . Swap ,
716720 rpcUrlForUniswap : RPC_URL ,
717721 signedUniswapQuote : {
718722 quote : signedUniswapQuote . quote ,
@@ -751,9 +755,10 @@ describe('Uniswap Swap Ability E2E Tests', () => {
751755
752756 // Verify the result is properly populated
753757 expect ( precheckResult . result ) . toBeDefined ( ) ;
754- expect ( BigInt ( precheckResult . result ! . nativeTokenBalance ) ) . toBeGreaterThan ( 0n ) ;
758+ expect ( precheckResult . result ! . nativeTokenBalance ) . not . toBeDefined ( ) ;
755759 expect ( precheckResult . result ! . tokenInAddress ) . toBe ( SWAP_TOKEN_IN_ADDRESS ) ;
756- expect ( BigInt ( precheckResult . result ! . tokenInBalance ) ) . toBeGreaterThan ( 0n ) ;
760+ expect ( precheckResult . result ! . tokenInBalance ) . toBeDefined ( ) ;
761+ expect ( BigInt ( precheckResult . result ! . tokenInBalance as string ) ) . toBeGreaterThan ( 0n ) ;
757762 expect ( BigInt ( precheckResult . result ! . currentTokenInAllowanceForSpender ) ) . toBeGreaterThan ( 0n ) ;
758763 expect ( precheckResult . result ! . spenderAddress ) . toBe ( signedUniswapQuote . quote . to ) ;
759764 } ) ;
0 commit comments