Skip to content

Commit

Permalink
fix testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
laizy committed Jun 19, 2024
1 parent 3b83817 commit 3360079
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions smartcontract/service/native/testsuite/ont_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@ func ontTransferV2(native *native.NativeService, from, to common.Address, value
}

func ontTransferFrom(native *native.NativeService, sender, from, to common.Address, value uint64) error {
native.Tx.SignedAddr = append(native.Tx.SignedAddr, from)
native.Tx.SignedAddr = append(native.Tx.SignedAddr, sender)
state := &ont.TransferFrom{Sender: sender, TransferState: ont.TransferState{From: from, To: to, Value: value}}
native.Input = common.SerializeToBytes(state)
_, err := ont.OntTransferFrom(native)
return err
}

func ontTransferFromV2(native *native.NativeService, sender, from, to common.Address, value uint64) error {
native.Tx.SignedAddr = append(native.Tx.SignedAddr, from)
native.Tx.SignedAddr = append(native.Tx.SignedAddr, sender)
state := &ont.TransferFromStateV2{Sender: sender, TransferStateV2: ont.TransferStateV2{From: from, To: to, Value: states.NativeTokenBalance{Balance: bigint.New(value)}}}
native.Input = common.SerializeToBytes(state)
_, err := ont.OntTransferFromV2(native)
Expand Down

0 comments on commit 3360079

Please sign in to comment.