contract method branding
This commit is contained in:
@@ -86,10 +86,10 @@ export const vaultAbi = [
|
||||
'function withdraw(address token, uint256 amount)',
|
||||
'function withdrawTo(address token, address recipient, uint256 amount)',
|
||||
'function numSwapOrders() view returns (uint64 num)',
|
||||
`function placeOrder(${SwapOrder})`,
|
||||
`function placeOrders(${SwapOrder}[], uint8 ocoMode)`,
|
||||
'function cancelOrder(uint64 orderIndex)',
|
||||
'function cancelAll()',
|
||||
`function placeDexorder(${SwapOrder})`,
|
||||
`function placeDexorders(${SwapOrder}[], uint8 ocoMode)`,
|
||||
'function cancelDexorder(uint64 orderIndex)',
|
||||
'function cancelAllDexorders()',
|
||||
// `function swapOrderStatus(uint64 orderIndex) view returns (${SwapOrderStatus} memory status)`,
|
||||
'function orderCanceled(uint64 orderIndex) view returns (bool)',
|
||||
]
|
||||
|
||||
@@ -285,7 +285,7 @@ export async function cancelOrder(vault, orderIndex) {
|
||||
console.error('vault contract was null while canceling order', vault, orderIndex)
|
||||
return null
|
||||
}
|
||||
return await contract.cancelOrder(orderIndex)
|
||||
return await contract.cancelDexorder(orderIndex)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ export async function cancelAll(vault) {
|
||||
console.error('vault contract was null while canceling order', vault)
|
||||
return null
|
||||
}
|
||||
return await contract.cancelAll()
|
||||
return await contract.cancelAllDexorders()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ function pendOrderAsTransaction(order) {
|
||||
return null
|
||||
}
|
||||
console.log('placing order', order)
|
||||
const tx = await contract.placeOrder(order.order) // todo update status
|
||||
const tx = await contract.placeDexorder(order.order) // todo update status
|
||||
order.tx = tx
|
||||
tx.wait().then((txReceipt)=>{
|
||||
const ws = useWalletStore();
|
||||
|
||||
Reference in New Issue
Block a user