Transfer - 送金を試してみる
Transfer
こんにちは、 @shogoです。
Steemにおいて、気づけば送金を試したことがなかったので、サクッとテストしてみました。
以下のようなFormを作成します。
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の確認画面が表示されました。
予想より簡単でしたが、送金先のSteemアカウントが存在しているか、数量がマイナスになっていないか、Memoの入力値checkなどはした方が良いかもしれません。
送金以外にも、まだ試していないことはあるので少しづつ勉強していきたいと思います :)
話は変わりますが、HardFork21が2週間後くらいに迫ってきていて、少し楽しみです。
Congratulations @shogo! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
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!