Skip to content

Commit

Permalink
Fix check_refund address flow
Browse files Browse the repository at this point in the history
  • Loading branch information
yogh333 committed Nov 14, 2024
1 parent 6914104 commit a32f593
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions doc/flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ sequenceDiagram
alt Trusted Name swap
rect rgb(200, 200, 200)
note right of EA: Trusted Name based swap
EA->>+TOCA: os_lib_call(CHECK_ADDRESS, address, derivation_path)
EA->>TOCA: os_lib_call(CHECK_ADDRESS, address, derivation_path)
activate TOCA
end
else
EA->>+TOCA: os_lib_call(CHECK_ADDRESS, payout_address, derivation_path)
EA->>TOCA: os_lib_call(CHECK_ADDRESS, payout_address, derivation_path)
end
TOCA-->>TOCA: Check that the [payout] address is owned by the device
TOCA-->>-EA: os_lib_end(): Result
TOCA-->>EA: os_lib_end(): Result
deactivate TOCA
EA->>+TOCA: os_lib_call(GET_PRINTABLE_AMOUNT)
TOCA-->>TOCA: Format the receiving amount
TOCA-->>-EA: os_lib_end(): Formatted amount
Expand All @@ -76,13 +78,15 @@ sequenceDiagram
alt Trusted Name swap
rect rgb(200, 200, 200)
note right of EA: Trusted Name based swap
EA->>+TOCA: os_lib_call(CHECK_ADDRESS, address, derivation_path)
EA->>FRCA: os_lib_call(CHECK_ADDRESS, address, derivation_path)
activate FRCA
end
else
EA->>+FRCA: os_lib_call(CHECK_ADDRESS, refund_address, derivation_path)
EA->>FRCA: os_lib_call(CHECK_ADDRESS, refund_address, derivation_path)
end
FRCA-->>FRCA: Check that the [refund] address belongs to the device
FRCA-->>-EA: os_lib_end(): Result
FRCA-->>EA: os_lib_end(): Result
deactivate FRCA
EA->>+FRCA: os_lib_call(GET_PRINTABLE_AMOUNT)
FRCA-->>FRCA: Format the sending amount
FRCA-->>-EA: os_lib_end(): Formatted amount
Expand Down

0 comments on commit a32f593

Please sign in to comment.