Browse Source

Match argument order of Send with CLI

xno
codesoap 9 months ago
parent
commit
c63561561f
  1. 2
      account_info.go
  2. 2
      cmd/atto/main.go

2
account_info.go

@ -25,7 +25,7 @@ type AccountInfo struct { @@ -25,7 +25,7 @@ type AccountInfo struct {
// Send creates a send block, which is hashed but missing the signature
// and work. The Frontier and Balance of the AccountInfo will be
// updated. The amount is interpreted as Nano, not raw!
func (i *AccountInfo) Send(toAddr, amount string) (Block, error) {
func (i *AccountInfo) Send(amount, toAddr string) (Block, error) {
balance, err := getBalanceAfterSend(i.Balance, amount)
if err != nil {
return Block{}, err

2
cmd/atto/main.go

@ -229,7 +229,7 @@ func sendFunds() error { @@ -229,7 +229,7 @@ func sendFunds() error {
}
fmt.Fprintf(os.Stderr, "Creating send block... ")
block, err := info.Send(recipient, amount)
block, err := info.Send(amount, recipient)
if err != nil {
return err
}

Loading…
Cancel
Save