Transfer - 送金を試してみる

in #japanese5 years ago (edited)

Transfer.png

Transfer

こんにちは、 @shogoです。

Steemにおいて、気づけば送金を試したことがなかったので、サクッとテストしてみました。

以下のようなFormを作成します。

test.png

Javascriptは以下のような感じです。

      const getFrom = app.username;
      const getTo = $("#inputTo").val();

      const getNumber = $("#inputNumber").val();
      const getCurrency = $("#currencySelect").val();
      const getAmount = getNumber + getCurrency;

      const getMemo = $("#inputMemo").val();

      const op = ['transfer', {
        from: getFrom,
        to: getTo,
        amount: getAmount,
        memo: getMemo
      }];

      steemconnect.sendOperation(op, {}, function(err, result) {
        console.log(err, result);
      });



FormのSENDボタンを押すと、見事SteemConnectの確認画面が表示されました。

コメント 2019-08-14 135320.png

予想より簡単でしたが、送金先のSteemアカウントが存在しているか、数量がマイナスになっていないか、Memoの入力値checkなどはした方が良いかもしれません。

送金以外にも、まだ試していないことはあるので少しづつ勉強していきたいと思います :)

話は変わりますが、HardFork21が2週間後くらいに迫ってきていて、少し楽しみです。

ending.gif

Sort:  

Congratulations @shogo! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You published more than 500 posts. Your next target is to reach 550 posts.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.19
TRX 0.14
JST 0.030
BTC 62668.27
ETH 3332.07
USDT 1.00
SBD 2.46