rpc: add validUntilBlock to transferNEP5
In #856 I forgot to add validUntilBlock to NEP5 transfer transaction, so added now.
This commit is contained in:
parent
ab8296bc57
commit
b809d09b24
1 changed files with 5 additions and 0 deletions
|
@ -113,6 +113,11 @@ func (c *Client) TransferNEP5(acc *wallet.Account, to util.Uint160, token *walle
|
||||||
Data: from.BytesBE(),
|
Data: from.BytesBE(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
tx.ValidUntilBlock, err = c.CalculateValidUntilBlock()
|
||||||
|
if err != nil {
|
||||||
|
return util.Uint256{}, fmt.Errorf("can't calculate validUntilBlock: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
if err := request.AddInputsAndUnspentsToTx(tx, acc.Address, core.UtilityTokenID(), gas, c); err != nil {
|
if err := request.AddInputsAndUnspentsToTx(tx, acc.Address, core.UtilityTokenID(), gas, c); err != nil {
|
||||||
return util.Uint256{}, fmt.Errorf("can't add GAS to transaction: %v", err)
|
return util.Uint256{}, fmt.Errorf("can't add GAS to transaction: %v", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue