From b809d09b24022a2766c823d12a6d7271dc9f7ff3 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Fri, 17 Apr 2020 13:52:23 +0300 Subject: [PATCH] rpc: add validUntilBlock to transferNEP5 In #856 I forgot to add validUntilBlock to NEP5 transfer transaction, so added now. --- pkg/rpc/client/nep5.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/rpc/client/nep5.go b/pkg/rpc/client/nep5.go index fd38e399c..e16d70d64 100644 --- a/pkg/rpc/client/nep5.go +++ b/pkg/rpc/client/nep5.go @@ -113,6 +113,11 @@ func (c *Client) TransferNEP5(acc *wallet.Account, to util.Uint160, token *walle 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 { return util.Uint256{}, fmt.Errorf("can't add GAS to transaction: %v", err) }