From eda06da4c762be9944fdc1dbb3c7786fc4719960 Mon Sep 17 00:00:00 2001 From: Determinant Date: Sat, 19 Sep 2020 14:33:17 -0400 Subject: ... --- plugin/evm/import_tx.go | 3 --- plugin/evm/vm.go | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'plugin') diff --git a/plugin/evm/import_tx.go b/plugin/evm/import_tx.go index 1297f7c..261e68f 100644 --- a/plugin/evm/import_tx.go +++ b/plugin/evm/import_tx.go @@ -179,7 +179,6 @@ func (vm *VM) newImportTx( to common.Address, // Address of recipient keys []*crypto.PrivateKeySECP256K1R, // Keys to import the funds ) (*Tx, error) { - log.Info("here0") if !vm.ctx.XChainID.Equals(chainID) { return nil, errWrongChainID } @@ -225,7 +224,6 @@ func (vm *VM) newImportTx( importedAVAXAmount := importedAmount[vm.ctx.AVAXAssetID.Key()] if importedAVAXAmount == 0 { - log.Info("here1") return nil, errNoFunds // No imported UTXOs were spendable } @@ -233,7 +231,6 @@ func (vm *VM) newImportTx( // AVAX output if importedAVAXAmount < vm.txFee { // imported amount goes toward paying tx fee - log.Info("here2") // TODO: spend EVM balance to compensate vm.txFee-importedAmount return nil, errNoFunds } else if importedAVAXAmount > vm.txFee { diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go index 2ce72be..52e4acf 100644 --- a/plugin/evm/vm.go +++ b/plugin/evm/vm.go @@ -898,7 +898,7 @@ func (vm *VM) GetSpendableCanonical(keys []*crypto.PrivateKeySECP256K1R, assetID } addr := GetEthAddress(key) var balance uint64 - if assetID == vm.ctx.AVAXAssetID { + if assetID.Equals(vm.ctx.AVAXAssetID) { balance = new(big.Int).Div(state.GetBalance(addr), x2cRate).Uint64() } else { balance = new(big.Int).Div(state.GetBalanceMultiCoin(addr, assetID.Key()), x2cRate).Uint64() -- cgit v1.2.3-70-g09d2