@gala-chain/chaincode ∙ API API > swapAmounts Function: swapAmounts() swapAmounts(arr, idx, idx2): void Parameters ▪ arr: string[] | BigNumber[] Array Element ▪ idx: number= 0 Element1 to swap ▪ idx2: number= 1 Element2 to swap Source chaincode/src/utils/dexUtils.ts:36