native coin handling
This commit is contained in:
@@ -44,7 +44,8 @@ const floatAmount = ref(0)
|
||||
function withdraw() {
|
||||
const vaultAddr = props.vault
|
||||
const valueStr = floatAmount.value.toString();
|
||||
const amount = FixedNumber.fromString(valueStr,{decimals:props.token.d, width:256, signed: false}).value;
|
||||
const amount = floatAmount.value === balanceFloat.value ? balance.value :
|
||||
FixedNumber.fromString(valueStr,{decimals:props.token.d, width:256, signed: false}).value;
|
||||
console.log('pending withdrawal', valueStr, amount, props.token.s)
|
||||
if( amount === 0n )
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user