diff options
author | Determinant <[email protected]> | 2020-09-19 13:52:35 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-09-19 13:52:35 -0400 |
commit | bf037f27122dcc96849b4dd3d9f9f76c9bb26292 (patch) | |
tree | 1e8b3cc4de7b8cc589855768f61a2d8c8732f2b8 /plugin/evm/export_tx.go | |
parent | acc4d0eeff3f4b254a3e81f14e8d5084b4df1418 (diff) |
fix the use of ids.ID
Diffstat (limited to 'plugin/evm/export_tx.go')
-rw-r--r-- | plugin/evm/export_tx.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/evm/export_tx.go b/plugin/evm/export_tx.go index ad70855..9cfd5ba 100644 --- a/plugin/evm/export_tx.go +++ b/plugin/evm/export_tx.go @@ -174,7 +174,7 @@ func (vm *VM) newExportTx( var toBurn uint64 var err error - if assetID == vm.ctx.AVAXAssetID { + if assetID.Equals(vm.ctx.AVAXAssetID) { toBurn, err = safemath.Add64(amount, vm.txFee) if err != nil { return nil, errOverflowExport @@ -189,7 +189,7 @@ func (vm *VM) newExportTx( } // burn non-AVAX - if assetID != vm.ctx.AVAXAssetID { + if !assetID.Equals(vm.ctx.AVAXAssetID) { ins2, signers2, err := vm.GetSpendableCanonical(keys, assetID, amount) if err != nil { return nil, fmt.Errorf("couldn't generate tx inputs/outputs: %w", err) @@ -228,7 +228,7 @@ func (tx *UnsignedExportTx) EVMStateTransfer(vm *VM, state *state.StateDB) error log.Info("crosschain C->X", "addr", from.Address, "amount", from.Amount) amount := new(big.Int).Mul( new(big.Int).SetUint64(from.Amount), x2cRate) - if from.AssetID == vm.ctx.AVAXAssetID { + if from.AssetID.Equals(vm.ctx.AVAXAssetID) { if state.GetBalance(from.Address).Cmp(amount) < 0 { return errInsufficientFunds } |