forked from TrueCloudLab/frostfs-node
[#1141] morph/client: Remove unneeded argument conversions
Client supports `util.Uint160` directly, no need to convert it to bytes. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
1e8391d216
commit
230a5cd037
6 changed files with 6 additions and 6 deletions
pkg/morph/client
|
@ -19,7 +19,7 @@ func (c *Client) BalanceOf(id *owner.ID) (*big.Int, error) {
|
|||
|
||||
invokePrm := client.TestInvokePrm{}
|
||||
invokePrm.SetMethod(balanceOfMethod)
|
||||
invokePrm.SetArgs(h.BytesBE())
|
||||
invokePrm.SetArgs(h)
|
||||
|
||||
prms, err := c.client.TestInvoke(invokePrm)
|
||||
if err != nil {
|
||||
|
|
|
@ -33,7 +33,7 @@ func (b *BurnPrm) SetID(id []byte) {
|
|||
func (c *Client) Burn(p BurnPrm) error {
|
||||
prm := client.InvokePrm{}
|
||||
prm.SetMethod(burnMethod)
|
||||
prm.SetArgs(p.to.BytesBE(), p.amount, p.id)
|
||||
prm.SetArgs(p.to, p.amount, p.id)
|
||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||
|
||||
return c.client.Invoke(prm)
|
||||
|
|
|
@ -45,7 +45,7 @@ func (l *LockPrm) SetDueEpoch(dueEpoch int64) {
|
|||
func (c *Client) Lock(p LockPrm) error {
|
||||
prm := client.InvokePrm{}
|
||||
prm.SetMethod(lockMethod)
|
||||
prm.SetArgs(p.id, p.user.BytesBE(), p.lock.BytesBE(), p.amount, p.dueEpoch)
|
||||
prm.SetArgs(p.id, p.user, p.lock, p.amount, p.dueEpoch)
|
||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||
|
||||
return c.client.Invoke(prm)
|
||||
|
|
|
@ -33,7 +33,7 @@ func (m *MintPrm) SetID(id []byte) {
|
|||
func (c *Client) Mint(p MintPrm) error {
|
||||
prm := client.InvokePrm{}
|
||||
prm.SetMethod(mintMethod)
|
||||
prm.SetArgs(p.to.BytesBE(), p.amount, p.id)
|
||||
prm.SetArgs(p.to, p.amount, p.id)
|
||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||
|
||||
return c.client.Invoke(prm)
|
||||
|
|
|
@ -36,7 +36,7 @@ func (c *Client) TransferX(p TransferPrm) error {
|
|||
|
||||
prm := client.InvokePrm{}
|
||||
prm.SetMethod(transferXMethod)
|
||||
prm.SetArgs(from.BytesBE(), to.BytesBE(), p.Amount, p.Details)
|
||||
prm.SetArgs(from, to, p.Amount, p.Details)
|
||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||
|
||||
err = c.client.Invoke(prm)
|
||||
|
|
|
@ -40,7 +40,7 @@ func (c *ChequePrm) SetLock(lock util.Uint160) {
|
|||
func (x *Client) Cheque(p ChequePrm) error {
|
||||
prm := client.InvokePrm{}
|
||||
prm.SetMethod(chequeMethod)
|
||||
prm.SetArgs(p.id, p.user.BytesBE(), p.amount, p.lock.BytesBE())
|
||||
prm.SetArgs(p.id, p.user, p.amount, p.lock)
|
||||
prm.InvokePrmOptional = p.InvokePrmOptional
|
||||
|
||||
return x.client.Invoke(prm)
|
||||
|
|
Loading…
Reference in a new issue