public void UpVoteOperationTest([Values("Steem", "Golos")] string name) { var op = new UpVoteOperation(Login[name], "joseph.kalu", "fkkl"); var prop = Manager(name).VerifyAuthority(UserPrivateKeys[name], op); //var prop = Manager(name).BroadcastOperations(UserPrivateKeys[name], op); Assert.IsFalse(prop.IsError, prop.GetErrorMessage()); }
public void PostDataToSteemWithUpvote() { Login = new Dictionary <string, string>() { { "Steem", txtUsername.Text } }; UserPrivateKeys = new Dictionary <string, List <byte[]> >() { { "Steem", new List <byte[]> { Base58.GetBytes(txtPassword.Text) } } }; Chain = new Dictionary <string, ChainInfo>(); var steemChainInfo = ChainManager.GetChainInfo(KnownChains.Steem); Chain.Add("Steem", steemChainInfo); Steem = new OperationManager(steemChainInfo.Url, steemChainInfo.ChainId); var op = new PostOperation(txtTag1.Text, txtUsername.Text, txtTitle.Text, txtResponse.Text, "{\"app\": \"steemit/0.1\", \"tags\": [\"" + txtTag2.Text + "\",\"" + txtTag3.Text + "\",\"" + txtTag4.Text + "\",\"" + txtTag5.Text + "\"]}"); var prop = Manager("Steem").VerifyAuthority(UserPrivateKeys["Steem"], op); var propa = Manager("Steem").BroadcastOperations(UserPrivateKeys["Steem"], op); if (propa.Error == null) { lblStatus.Text = "'Post to STEEM' transaction successfully completed!"; var up = new UpVoteOperation(txtUsername.Text, txtUsername.Text, op.Permlink); var uprop = Manager("Steem").VerifyAuthority(UserPrivateKeys["Steem"], up); var upropa = Manager("Steem").BroadcastOperations(UserPrivateKeys["Steem"], up); } else { lblStatus.Text = "Error posting on STEEM: " + propa.Error.Message.ToString(); } }