Skip to content
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1cf1533
test: enable generation of ledger UI from `EffectHash` test vectors
redshiftzero Dec 2, 2024
e1abfcb
test: add address display logic for ledger UI
redshiftzero Dec 2, 2024
114e9f9
test: add value display for ledger UI
redshiftzero Dec 2, 2024
2f17bdc
test: respect max line length on ledger screen
redshiftzero Dec 3, 2024
f957c82
test: add fee display to txplan ledger ui output
redshiftzero Dec 3, 2024
2d03c61
test: add memo display to ledger UI
redshiftzero Dec 3, 2024
68bea36
test: ledger ui for spends
redshiftzero Dec 3, 2024
8309221
test: ledger ui for outputs
redshiftzero Dec 3, 2024
2f22923
test: add Ics20Withdrawal ledger ui
redshiftzero Dec 3, 2024
9a5c3f1
test: ledger UI for swaps
redshiftzero Dec 3, 2024
a51448e
test: swap strategy should produce plans with one zero amount
redshiftzero Dec 4, 2024
ccf6e60
test: memos should sometimes be included in a transaction plan
redshiftzero Dec 4, 2024
60261f2
test: more realistic address generation
redshiftzero Dec 4, 2024
e4b64a4
test: sometimes expiry height should be absent
redshiftzero Dec 4, 2024
d2e56db
test: regenerate test vectors, add hw ledger UI for tier 1 actions
redshiftzero Dec 4, 2024
4441e3a
fix: rendering of `Swap` and `Ics20Withdrawal`s
redshiftzero Dec 6, 2024
d7c7193
test: add ledger UI for delegations
redshiftzero Dec 17, 2024
fe0e35b
test: add ledger UI for undelegate
redshiftzero Dec 17, 2024
3187d27
test: add ledger UI for undelegateclaim
redshiftzero Dec 17, 2024
15b08ca
test: ledger UI for delegatorvote
redshiftzero Dec 17, 2024
597e886
test: add ledger UI for `PositionOpen`
redshiftzero Dec 17, 2024
14795d9
test: add ledger UI for `PositionClose`
redshiftzero Dec 17, 2024
3e5c019
test: add ledger UI for `PositionWithdraw`
redshiftzero Dec 17, 2024
6f6da2d
test: add ledger UI for `ActionDutchAuctionSchedule`
redshiftzero Dec 17, 2024
6d557de
test: ledger UI for `ActionDutchAuctionEnd`
redshiftzero Dec 17, 2024
be19662
test: add ledger UI for `ActionDutchAuctionEnd`
redshiftzero Dec 17, 2024
dc8ca35
test: regenerate hardware wallet UI screens
redshiftzero Dec 17, 2024
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
Prev Previous commit
Next Next commit
test: ledger ui for spends
  • Loading branch information
redshiftzero committed Dec 3, 2024
commit 68bea36aae0ac1b87ff1dcdc540a2e35b98fa2fd
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,35 @@ fn generate_normal_output(plan: &TransactionPlan, fvk: &FullViewingKey) -> Vec<S
index += 1;
}

// TODO: Rest of the tx
for action in &plan.actions {
match action {
ActionPlan::Spend(spend) => {
// Format the value
let value_display = value_display(
&spend.note.value(),
&plan.transaction_parameters.chain_id,
&base_denoms,
);

// Format the address
let address_display = address_display(&spend.note.address(), fvk);

// Combine into "Spend {value} from {address}"
let spend_display = format!("Spend {} from {}", value_display, address_display);

for line in format_for_display("Action", spend_display) {
output.push(format!("{} | {}", index, line));
}
index += 1;
}
ActionPlan::Output(output) => {
// TODO: populate this
}
_ => {
// TODO: populate this
}
}
}

output
}
Expand Down