Skip to content

Commit e1a340a

Browse files
committed
Small fix.
1 parent 182769d commit e1a340a

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

core/cli/node/wallet.hpp

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -91,33 +91,15 @@ namespace fc::cli::_node {
9191
fmt::print("{}\n", encodeToString(address));
9292
} else {
9393
auto maybe_actor = api._->StateGetActor(
94-
address, TipsetKey{}); // TODO this place input on console log of
94+
address, TipsetKey{});
9595

9696
Actor actor;
9797
if (maybe_actor.has_error()) {
98-
TipsetCPtr chain_head =
99-
cliTry(api._->ChainHead(), "Getting chain head...");
100-
CID state_root = chain_head->getParentStateRoot();
101-
/*
102-
auto network_version =
103-
cliTry(api._->StateNetworkVersion(chain_head->key), "Getting network
104-
version..."); // TODO tipsetkey? auto ipfs =
105-
std::make_shared<ApiIpfsDatastore>(api._); ipfs->actor_version =
106-
actorVersion(network_version);
107-
*/
108-
auto ipfs = std::make_shared<ApiIpfsDatastore>(api._);
109-
StateTreeImpl tree{ipfs, state_root};
110-
auto actor_exist = tree.tryGet(address);
111-
112-
if (not actor_exist.has_value()) {
11398
table_writer.write(
11499
{{"Address", encodeToString(address)},
115100
{"Error", "Error get actor"}});
116101
continue;
117-
}
118-
actor = maybe_actor.value();
119102

120-
actor.balance = 0;
121103
} else {
122104
actor = maybe_actor.value();
123105
}
@@ -301,7 +283,7 @@ namespace fc::cli::_node {
301283
CLI_RUN() {
302284
const Node::Api api{argm};
303285
const Address signing_address{cliArgv<Address>(argv, 0, "Signing address")};
304-
const std::string hex_message{cliArgv<std::string>(argv, 0, "Hex message")};
286+
const std::string hex_message{cliArgv<std::string>(argv, 1, "Hex message")};
305287

306288
const Bytes decode_message =
307289
cliTry(unhex(hex_message), "Decoding hex message...");
@@ -381,6 +363,9 @@ namespace fc::cli::_node {
381363

382364
const auto cid_signed_message = cliTry(api._->MarketAddBalance(address_from, address, amt),
383365
"Add balance...");
366+
const MsgWait message_wait =
367+
cliTry(api._->StateWaitMsg(cid_signed_message.value(), 1, 10, false),
368+
"Wait message");
384369

385370
fmt::print("Add balance message cid : {}\n", cid_signed_message.value());
386371
}

0 commit comments

Comments
 (0)