Skip to content

Commit 94deb4d

Browse files
swap fields parse update
1 parent 4f3a22a commit 94deb4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

keychain_lib/src/keychain_commands.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ bool swap_action(std::string data, swap_cmd_t::swap_t &swap_info) {
3535
if (data.length() != 8 + 64)
3636
return false;
3737

38-
auto address = data.substr(8, 64);
38+
auto address = data.substr(8+24, 40);
3939
swap_info.action = swap_cmd_t::action_te::refund;
4040
swap_info.address = address;
4141
} else if (func == SWAP_F3) {
4242
if (data.length() != 8 + 64 + 64)
4343
return false;
4444

4545
auto secret = data.substr(8, 64);
46-
auto address = data.substr(8 + 64, 64);
46+
auto address = data.substr(8 + 64+24, 40);
4747
swap_info.action = swap_cmd_t::action_te::withdraw;
4848
swap_info.address = address;
4949
swap_info.secret = secret;

0 commit comments

Comments
 (0)