Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add whitelisted SPL tokens to show proper tickers #80

Merged
merged 8 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ APPNAME = "Solana"
# Application version
APPVERSION_M = 1
APPVERSION_N = 5
APPVERSION_P = 0
APPVERSION_P = 1
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

# Application source files
Expand Down
10 changes: 5 additions & 5 deletions libsol/message_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1584,7 +1584,7 @@ void test_process_message_body_spl_token_transfer() {
42, 0, 0, 0, 0, 0, 0, 0,
9
};
process_message_body_and_sanity_check(message, sizeof(message), 5);
process_message_body_and_sanity_check(message, sizeof(message), 6);
}

void test_process_message_body_spl_token_approve() {
Expand All @@ -1606,7 +1606,7 @@ void test_process_message_body_spl_token_approve() {
42, 0, 0, 0, 0, 0, 0, 0,
9
};
process_message_body_and_sanity_check(message, sizeof(message), 5);
process_message_body_and_sanity_check(message, sizeof(message), 6);
}

void test_process_message_body_spl_token_revoke() {
Expand Down Expand Up @@ -1687,7 +1687,7 @@ void test_process_message_body_spl_token_burn() {
42, 0, 0, 0, 0, 0, 0, 0,
9
};
process_message_body_and_sanity_check(message, sizeof(message), 4);
process_message_body_and_sanity_check(message, sizeof(message), 5);
}

void test_process_message_body_spl_token_close_account() {
Expand Down Expand Up @@ -1819,7 +1819,7 @@ void test_process_message_body_spl_associated_token_create_with_transfer() {
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x09
};
process_message_body_and_sanity_check(message, sizeof(message), 9);
process_message_body_and_sanity_check(message, sizeof(message), 10);
}

void test_process_message_body_spl_associated_token_create_with_transfer_and_assert_owner() {
Expand Down Expand Up @@ -1858,7 +1858,7 @@ void test_process_message_body_spl_associated_token_create_with_transfer_and_ass
0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x09
};
process_message_body_and_sanity_check(message, sizeof(message), 9);
process_message_body_and_sanity_check(message, sizeof(message), 10);
}

/* clang-format on */
Expand Down
15 changes: 11 additions & 4 deletions libsol/spl_token_instruction.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,9 @@ int print_spl_token_transfer_info(const SplTokenTransferInfo* info,
symbol,
info->body.decimals);

item = transaction_summary_general_item();
summary_item_set_pubkey(item, "Mint", info->mint_account);

item = transaction_summary_general_item();
summary_item_set_pubkey(item, "From", info->src_account);

Expand All @@ -528,6 +531,9 @@ static int print_spl_token_approve_info(const SplTokenApproveInfo* info,
symbol,
info->body.decimals);

item = transaction_summary_general_item();
summary_item_set_pubkey(item, "Mint", info->mint_account);

item = transaction_summary_general_item();
summary_item_set_pubkey(item, "From", info->token_account);

Expand Down Expand Up @@ -591,10 +597,8 @@ static int print_spl_token_mint_to_info(const SplTokenMintToInfo* info,
symbol,
info->body.decimals);

if (print_config->expert_mode) {
item = transaction_summary_general_item();
summary_item_set_pubkey(item, "From", info->mint_account);
}
item = transaction_summary_general_item();
summary_item_set_pubkey(item, "Mint", info->mint_account);

item = transaction_summary_general_item();
summary_item_set_pubkey(item, "To", info->token_account);
Expand All @@ -618,6 +622,9 @@ static int print_spl_token_burn_info(const SplTokenBurnInfo* info,
symbol,
info->body.decimals);

item = transaction_summary_general_item();
summary_item_set_pubkey(item, "Mint", info->mint_account);

item = transaction_summary_general_item();
summary_item_set_pubkey(item, "From", info->token_account);

Expand Down
Loading
Loading