Skip to content

Commit

Permalink
cleanup: helpers_test.go should use new BigInt constructor methods
Browse files Browse the repository at this point in the history
  • Loading branch information
randomshinichi committed Mar 23, 2019
1 parent 7cd0bd5 commit 1869bc7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions aeternity/helpers_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package aeternity_test

import (
"math/big"
"testing"

"github.com/aeternity/aepp-sdk-go/aeternity"
Expand All @@ -11,16 +10,16 @@ import (
func TestSpendTxStr(t *testing.T) {
sender := "ak_2a1j2Mk9YSmC1gioUq4PWRm3bsv887MbuRVwyv4KaUGoR1eiKi"
recipient := "ak_Egp9yVdpxmvAfQ7vsXGvpnyfNq71msbdUpkMNYGTeTe8kPL3v"
amount := utils.BigInt{Int: big.Int{}}
amount := utils.NewBigInt()
fee := utils.NewBigInt()
amount.SetInt64(10)
fee := utils.BigInt{Int: big.Int{}}
fee.SetInt64(10)
message := "Hello World"
ttl := uint64(10)
nonce := uint64(1)
eBase64TxMsg := "tx_+FYMAaEBzqet5HDJ+Z2dTkAIgKhvHUm7REti8Rqeu2S7z+tz/vOhAR8To7CL8AFABmKmi2nYdfeAPOxMCGR/btXYTHiXvVCjCgoKAYtIZWxsbyBXb3JsZPSZjdM="

base64TxMsg, err := aeternity.SpendTxStr(sender, recipient, amount, fee, message, ttl, nonce)
base64TxMsg, err := aeternity.SpendTxStr(sender, recipient, *amount, *fee, message, ttl, nonce)
if err != nil {
t.Fatalf("SpendTx could not create a SpendTransaction: %v", err)
}
Expand Down

0 comments on commit 1869bc7

Please sign in to comment.