Skip to content

token-swap run test fail #354

@kuchaguangjie

Description

@kuchaguangjie

test for token-swap, on localnet, get error:

  Create AMM
    ✔ Creation (387ms)
    ✔ Invalid fee (71ms)

  Create pool
    1) "before each" hook for "Creation"

  Deposit liquidity
    2) "before each" hook for "Deposit equal amounts"

  Swap
    3) "before each" hook for "Swap from A to B"

  Withdraw liquidity
    4) "before each" hook for "Withdraw everything"


  2 passing (11s)
  4 failing

  1) Create pool
       "before each" hook for "Creation":
     TypeError: Cannot read properties of undefined (reading 'toString')
      at Transaction.sign (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/transaction/legacy.ts:671:36)
      at Connection.sendTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/connection.ts:5846:21)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at sendAndConfirmTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts:35:21)

  2) Deposit liquidity
       "before each" hook for "Deposit equal amounts":
     TypeError: Cannot read properties of undefined (reading 'toString')
      at Transaction.sign (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/transaction/legacy.ts:671:36)
      at Connection.sendTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/connection.ts:5846:21)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at sendAndConfirmTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts:35:21)

  3) Swap
       "before each" hook for "Swap from A to B":
     TypeError: Cannot read properties of undefined (reading 'toString')
      at Transaction.sign (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/transaction/legacy.ts:671:36)
      at Connection.sendTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/connection.ts:5846:21)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at sendAndConfirmTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts:35:21)

  4) Withdraw liquidity
       "before each" hook for "Withdraw everything":
     TypeError: Cannot read properties of undefined (reading 'toString')
      at Transaction.sign (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/transaction/legacy.ts:671:36)
      at Connection.sendTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/connection.ts:5846:21)
      at processTicksAndRejections (node:internal/process/task_queues:105:5)
      at sendAndConfirmTransaction (node_modules/.pnpm/@[email protected][email protected][email protected]/node_modules/@solana/web3.js/src/utils/send-and-confirm-transaction.ts:35:21)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions