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();
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<v-chip v-if="item.state===OrderState.Open" class="d-none d-lg-inline-flex" prepend-icon="mdi-dots-horizontal"
|
||||
color="green">Open
|
||||
</v-chip>
|
||||
<btn v-if="isOpen(item.state)" class="d-none d-sm-inline-flex d-lg-none" icon="mdi-cancel" color="red"
|
||||
<btn v-if="isOpen(item.state)" class="d-none d-sm-inline-flex" icon="mdi-cancel" color="red"
|
||||
@click="cancelOrder(vaultAddr,item.index)">Cancel
|
||||
</btn>
|
||||
<btn v-if="isOpen(item.state)" class="d-sm-none" variant="plain" icon="mdi-cancel" color="red"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<v-btn variant="flat" prepend-icon="mdi-plus" @click="co.newOrder" v-if="co.orders.length===0">New Order</v-btn>
|
||||
<v-btn variant="text" prepend-icon="mdi-send" @click="placeOrder"
|
||||
:color="orderColor" v-if="co.orders.length>0" :disabled="co.drawing">
|
||||
Place Order
|
||||
Place Dexorder
|
||||
</v-btn>
|
||||
<v-btn variant="flat" prepend-icon="mdi-cancel" v-if="co.orders.length>0" @click="cancelOrder">Cancel</v-btn>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user