Skip to content

Commit

Permalink
fix tx sending with kk
Browse files Browse the repository at this point in the history
  • Loading branch information
rasom committed Aug 10, 2021
1 parent 32db027 commit 5718107
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
16 changes: 12 additions & 4 deletions src/status_im/signing/keycard.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,23 @@

(defn prepare-transaction
[{:keys [gas gasPrice data nonce tx-obj]}]
(let [{:keys [from to value chat-id message-id command?]} tx-obj]
(let [{:keys [from to value chat-id message-id command? maxPriorityFeePerGas maxFeePerGas]} tx-obj]
(cond-> {:from from
:to to
:value value
:gas (str "0x" (abi-spec/number-to-hex gas))
:gasPrice (str "0x" (abi-spec/number-to-hex gasPrice))
:chat-id chat-id
:message-id message-id
:command? command?}
maxPriorityFeePerGas
(assoc :maxPriorityFeePerGas (str "0x" (abi-spec/number-to-hex
(js/parseInt maxPriorityFeePerGas))))
maxFeePerGas
(assoc :maxFeePerGas (str "0x" (abi-spec/number-to-hex
(js/parseInt maxFeePerGas))))
gas
(assoc :gas (str "0x" (abi-spec/number-to-hex gas)))
gasPrice
(assoc :gasPrice (str "0x" (abi-spec/number-to-hex gasPrice)))
data
(assoc :data data)
nonce
Expand Down Expand Up @@ -93,7 +101,7 @@
(fx/defn sign-with-keycard
{:events [:signing.ui/sign-with-keycard-pressed]}
[{:keys [db] :as cofx}]
(let [message (get-in db [:signing/tx :message])]
(let [{:keys [message maxPriorityFeePerGas maxFeePerGas]} (get db :signing/tx)]
(fx/merge
cofx
{:db (-> db
Expand Down
6 changes: 3 additions & 3 deletions status-go-version.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
"owner": "status-im",
"repo": "status-go",
"version": "v0.83.5",
"commit-sha1": "89251e841655082076ef304791b9ee3145f337c2",
"src-sha256": "0f0mw5bv4rwi6i9q4xa7shrjd8r4qwq5ky7lm6jjszyrqwhhf74j"
"version": "adjust-has-transaction",
"commit-sha1": "d3b9d998ab9ba12e8efa173a6425c5813d94d615",
"src-sha256": "1b3zf19d9jbbf96rhabcwsmf0j332x31zass8dvs1mi49wm8l1if"
}

0 comments on commit 5718107

Please sign in to comment.