Fix sending collectible by building transaction before signing (#21744)
* Fix sending collectible by building transaction before signing
This commit is contained in:
parent
caaff74efe
commit
27bfbea6bd
|
@ -336,6 +336,13 @@
|
|||
:start-flow? start-flow?
|
||||
:flow-id :wallet-send-flow}]]]})))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet/build-transaction-for-collectible-route
|
||||
(fn [{:keys [db]}]
|
||||
(let [last-request-uuid (get-in db [:wallet :ui :send :last-request-uuid])]
|
||||
{:db (update-in db [:wallet :ui :send] dissoc :transaction-for-signing)
|
||||
:fx [[:dispatch [:wallet/build-transactions-from-route {:request-uuid last-request-uuid}]]]})))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet/set-token-amount-to-bridge
|
||||
(fn [{:keys [db]} [{:keys [amount stack-id start-flow?]}]]
|
||||
|
|
|
@ -249,6 +249,17 @@
|
|||
user-props {:full-name to-address
|
||||
:address (utils/get-shortened-address
|
||||
to-address)}]
|
||||
;; In token send flow we already have transaction built when
|
||||
;; we reach confirmation screen. But in send collectible flow
|
||||
;; routes request happens at the same time with navigation to
|
||||
;; confirmation screen. So we need to build the transaction as soon
|
||||
;; as route is available.
|
||||
(rn/use-effect
|
||||
(fn []
|
||||
(when (and (send-utils/tx-type-collectible? transaction-type)
|
||||
first-route)
|
||||
(rf/dispatch [:wallet/build-transaction-for-collectible-route])))
|
||||
[first-route])
|
||||
[rn/view {:style {:flex 1}}
|
||||
[floating-button-page/view
|
||||
{:footer-container-padding 0
|
||||
|
|
Loading…
Reference in New Issue