aepp-sdk-elixir icon indicating copy to clipboard operation
aepp-sdk-elixir copied to clipboard

Can't use the SDK to send coins

Open arpunk opened this issue 5 years ago • 0 comments

Hello,

I've been trying to use the SDK but I cannot get it to send coins across local development nodes and/or testnet. Both my wallets have funds and I'm able to send/receive using different wallets with the same keypair.

dev λ[1]: AeppSDK.Account.get(client())                                                                                           
{:ok,
 %{
   auth_fun: nil,
   balance: 5000000000000000000,
   contract_id: nil,
   id: "ak_wat",
   kind: "basic",
   nonce: 0,
   payable: true
 }}

Using the SDK I can see that my wallets are both funded and the communication to the node is working, however I cannot spend coins:

dev λ[2]: AeppSDK.Account.spend(client(), address, amount)
{:error, "Invalid tx"}

And using AENS gives me the same error:

dev λ[4]: AeppSDK.Account.spend(client(), "sometestname.chain", amount)
{:error, "Invalid tx"}

I'm using the same configuration used in the examples/ instructions:

[
  public_key: "ak_wat",
  secret_key: "wat",
  network_id: "ae_uat",
  url: "https://sdk-testnet.aepps.com/v2",
  internal_url: "https://sdk-testnet.aepps.com/v2"
]

I'm using Erlang/OTP 22.3.4.2/23.0.2 and Elixir 1.10.4. I tried with aeternity v5.4.1 and v5.5.4 locally, and the versions currently deployed at sdk-testnet.aepps.com.

arpunk avatar Jul 09 '20 14:07 arpunk