Skip to content

Commit

Permalink
FEAT: switches map/cs syntaxes.
Browse files Browse the repository at this point in the history
  • Loading branch information
dockimbel committed Feb 11, 2024
1 parent c30be2a commit ebb06a3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
12 changes: 6 additions & 6 deletions keys/Trezor/trezor.red
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ trezor-old: context [
res [map!]
return: [integer!]
][
WriteAndRead 'Initialize 'Features #() res
WriteAndRead 'Initialize 'Features #[] res
]

EthereumGetAddress: func [
Expand Down Expand Up @@ -224,8 +224,8 @@ trezor-old: context [
res2: make map! []
proto-encode/decode trezor-message/messages 'ButtonRequest res2 command-buffer
res2: make map! []
WriteAndRead 'ButtonAck 'ButtonRequest #() res2
WriteAndRead 'ButtonAck 'EthereumTxRequest #() res
WriteAndRead 'ButtonAck 'ButtonRequest #[] res2
WriteAndRead 'ButtonAck 'EthereumTxRequest #[] res
]

;-- A Sequence like this, GetAbcd -> [PinMatrixRequest -> PinMatrixAck -> GetAbcd] -> Abcd
Expand Down Expand Up @@ -605,7 +605,7 @@ trezor: context [
res [map!]
return: [integer!]
][
WriteAndRead 'Initialize 'Features #() res
WriteAndRead 'Initialize 'Features #[] res
]

EthereumGetAddress: func [
Expand Down Expand Up @@ -647,8 +647,8 @@ trezor: context [
res2: make map! []
proto-encode/decode trezor-message/messages 'ButtonRequest res2 command-buffer
res2: make map! []
WriteAndRead 'ButtonAck 'ButtonRequest #() res2
WriteAndRead 'ButtonAck 'EthereumTxRequest #() res
WriteAndRead 'ButtonAck 'ButtonRequest #[] res2
WriteAndRead 'ButtonAck 'EthereumTxRequest #[] res
]

SignTxSequence: func [
Expand Down
4 changes: 2 additions & 2 deletions libs/ethereum.red
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ eth: context [
)
]

body: #(
body: #[
jsonrpc: "2.0"
id: 1
method: none
params: none
)
]

cookie: func [str [string!]][
lowercase take/part enbase/base checksum str 'sha256 16 16
Expand Down
18 changes: 9 additions & 9 deletions settings.red
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ load-cfg: func [/local cfg-dir cfg-content default-cfg][
;-- Token name | NetWorks | Decimal places | Fullname
tokens: [
"BTC" [
"MainNet" #[none]
"TestNet" #[none]
"MainNet" #(none)
"TestNet" #(none)
] 8 "Bitcoin"
"BTC (Legacy)" [
"MainNet" #[none]
"TestNet" #[none]
"MainNet" #(none)
"TestNet" #(none)
] 8 "Bitcoin"
"ETH" [
"mainnet" #[none]
"Rinkeby" #[none]
"Kovan" #[none]
"Ropsten" #[none]
"mainnet" #(none)
"Rinkeby" #(none)
"Kovan" #(none)
"Ropsten" #(none)
] 18 "Ethereum"
"RED" [
"mainnet" "76960Dccd5a1fe799F7c29bE9F19ceB4627aEb2f"
Expand All @@ -63,7 +63,7 @@ load-cfg: func [/local cfg-dir cfg-content default-cfg][
]

Ledger-Path: [8000002Ch 8000003Ch 80000000h idx]
win-pos: #[none]
win-pos: #(none)
]

cfg: either all [
Expand Down
16 changes: 8 additions & 8 deletions wallet.red
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,18 @@ wallet: context [
contracts: [
;-- Token name | NetWorks | Decimal places | Fullname
"BTC" [
"MainNet" #[none]
"TestNet" #[none]
"MainNet" #(none)
"TestNet" #(none)
] 8 "Bitcoin"
"BTC (Legacy)" [
"MainNet" #[none]
"TestNet" #[none]
"MainNet" #(none)
"TestNet" #(none)
] 8 "Bitcoin"
"ETH" [
"MainNet" #[none]
"Rinkeby" #[none]
"Kovan" #[none]
"Ropsten" #[none]
"MainNet" #(none)
"Rinkeby" #(none)
"Kovan" #(none)
"Ropsten" #(none)
] 18 "Ethereum"
"RED" [
"mainnet" "76960Dccd5a1fe799F7c29bE9F19ceB4627aEb2f"
Expand Down

0 comments on commit ebb06a3

Please sign in to comment.