Skip to content

Commit c1a4ef0

Browse files
author
skoupidi
committed
drk/money: fixed token auth parsing and added TODO to support custom ones
1 parent 06ea4d1 commit c1a4ef0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

bin/drk/src/money.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,9 +812,11 @@ impl Drk {
812812
// Grab the note from the child auth call
813813
let child_idx = call.children_indexes[0];
814814
let child_call = &calls[child_idx];
815-
let child_params: MoneyAuthTokenMintParamsV1 =
816-
deserialize_async(&child_call.data.data[1..]).await?;
817-
coins.push((params.coin, child_params.enc_note, false));
815+
// TODO: Grab the encrypted note from custom auth calls
816+
match deserialize_async::<MoneyAuthTokenMintParamsV1>(&child_call.data.data[1..]).await {
817+
Ok(child_params) => coins.push((params.coin, child_params.enc_note, false)),
818+
Err(_) => scan_cache.log(String::from("[parse_money_call] Found non-native contract Token mint authority, skipping.")),
819+
}
818820
}
819821
MoneyFunction::BurnV1 => {
820822
scan_cache.log(String::from("[parse_money_call] Found Money::BurnV1 call"));

0 commit comments

Comments
 (0)