fix(solana): show `source_account` when approving a delegate
What changed, and why it matters
This update fixes a display issue in Trezor's Solana token support. When a user approves a delegate (someone who can spend tokens on their behalf) using the older 'Approve' instruction, the device screen previously did not show which token account was being delegated. If a user owns several token accounts, they could accidentally approve the wrong one. The fix adds the source account to the on-screen confirmation, matching what the newer 'ApproveChecked' instruction already shows.
Users should update to firmware containing this commit and carefully verify all displayed fields, including the 'From' source account, when approving Solana token delegates. Developers should ensure similar UI parity for deprecated instructions across other token programs.
Security signals we found
UI display omission for sensitive authorization action
Risk of user approving unintended token account delegate
Fix aligns deprecated instruction UI with checked instruction UI
No changelog entry despite security-relevant behavior change
Evidence from the diff
The commit adds a UIProperty for the ‘source_account’ field to the Solana Token program’s ‘Approve’ and ‘ApproveChecked’ instruction definitions in programs.json and the generated instructions.py. Previously, source_account was marked as ‘(not shown)’ in programs.md. The change causes the Trezor device to display the source account labeled ‘From’ during transaction confirmation, reducing ambiguity when multiple token accounts exist under the same owner.
Changed components
Trezor firmware Solana appcommon/defs/solana/programs.jsoncommon/defs/solana/programs.mdcore/src/apps/solana/transaction/instructions.pyInspect captured patch +22 / −2
diff --git a/common/defs/solana/programs.json b/common/defs/solana/programs.json
index 32711695..e535c9e2 100644
--- a/common/defs/solana/programs.json
+++ b/common/defs/solana/programs.json
@@ -1225,6 +1225,10 @@
"parameter": "amount",
"display_name": "Allowance"
},
+ {
+ "account": "source_account",
+ "display_name": "From"
+ },
{
"account": "owner",
"display_name": "Owner",
@@ -1869,6 +1873,10 @@
"parameter": "amount",
"display_name": "Allowance"
},
+ {
+ "account": "source_account",
+ "display_name": "From"
+ },
{
"account": "owner",
"display_name": "Owner",
diff --git a/common/defs/solana/programs.md b/common/defs/solana/programs.md
index af03481c..9829c209 100644
--- a/common/defs/solana/programs.md
+++ b/common/defs/solana/programs.md
@@ -326,8 +326,8 @@ _This file is generated by `programs.md.mako` via `make solana_templates`, do no
|-------|-------|------|
| Approve delegate | `delegate_account` | `account` |
| Allowance | `amount` | `u64` |
+| From | `source_account` | `account` |
| Owner | `owner` | `account` |
-| _(not shown)_ | `source_account` | `account` |
### (5) Revoke
@@ -495,8 +495,8 @@ _This file is generated by `programs.md.mako` via `make solana_templates`, do no
|-------|-------|------|
| Approve delegate | `delegate_account` | `account` |
| Allowance | `amount` | `u64` |
+| From | `source_account` | `account` |
| Owner | `owner` | `account` |
-| _(not shown)_ | `source_account` | `account` |
### (5) Revoke
diff --git a/core/src/apps/solana/transaction/instructions.py b/core/src/apps/solana/transaction/instructions.py
index 24dea7f3..64943fa7 100644
--- a/core/src/apps/solana/transaction/instructions.py
+++ b/core/src/apps/solana/transaction/instructions.py
@@ -2601,6 +2601,12 @@ def get_instruction(
"Allowance",
None,
),
+ UIProperty(
+ None,
+ "source_account",
+ "From",
+ None,
+ ),
UIProperty(
None,
"owner",
@@ -3456,6 +3462,12 @@ def get_instruction(
"Allowance",
None,
),
+ UIProperty(
+ None,
+ "source_account",
+ "From",
+ None,
+ ),
UIProperty(
None,
"owner",
Why this scored 49/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.