From acc4d0eeff3f4b254a3e81f14e8d5084b4df1418 Mon Sep 17 00:00:00 2001 From: Determinant Date: Sat, 19 Sep 2020 12:43:04 -0400 Subject: ... --- plugin/evm/export_tx.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugin') diff --git a/plugin/evm/export_tx.go b/plugin/evm/export_tx.go index d9e2829..ad70855 100644 --- a/plugin/evm/export_tx.go +++ b/plugin/evm/export_tx.go @@ -115,7 +115,7 @@ func (tx *UnsignedExportTx) SemanticVerify( } for _, in := range tx.Ins { - fc.Consume(vm.ctx.AVAXAssetID, in.Amount) + fc.Consume(in.AssetID, in.Amount) } if err := fc.Verify(); err != nil { @@ -190,7 +190,7 @@ func (vm *VM) newExportTx( // burn non-AVAX if assetID != vm.ctx.AVAXAssetID { - ins2, signers2, err := vm.GetSpendableCanonical(keys, assetID, toBurn) + ins2, signers2, err := vm.GetSpendableCanonical(keys, assetID, amount) if err != nil { return nil, fmt.Errorf("couldn't generate tx inputs/outputs: %w", err) } @@ -205,7 +205,7 @@ func (vm *VM) newExportTx( DestinationChain: chainID, Ins: ins, ExportedOutputs: []*avax.TransferableOutput{{ // Exported to X-Chain - Asset: avax.Asset{ID: vm.ctx.AVAXAssetID}, + Asset: avax.Asset{ID: assetID}, Out: &secp256k1fx.TransferOutput{ Amt: amount, OutputOwners: secp256k1fx.OutputOwners{ -- cgit v1.2.3-70-g09d2