diff options
author | Determinant <[email protected]> | 2020-09-19 12:43:04 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-09-19 12:43:04 -0400 |
commit | acc4d0eeff3f4b254a3e81f14e8d5084b4df1418 (patch) | |
tree | b78afd2527ce6b733b519ad851662404e8857f76 /plugin/evm | |
parent | 2580891f8be274b43ffa633edb11b8332e21f172 (diff) |
...
Diffstat (limited to 'plugin/evm')
-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 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{ |