test case for two transactions one after another
This commit is contained in:
parent
10e0ec885c
commit
22270a8c61
|
@ -184,6 +184,22 @@
|
|||
_ (.execute batch)]
|
||||
nil))))
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
:send-2tx
|
||||
(fn [{{:keys [web3]} :db} _]
|
||||
(when web3
|
||||
(.sendTransaction (.-eth web3)
|
||||
(clj->js {:to "0x2127edab5d08b1e11adf7ae4bae16c2b33fdf74a"
|
||||
:value (.toWei web3 "0.00001" "ether")})
|
||||
(fn [e r]
|
||||
(when (and (not e) r)
|
||||
(.sendTransaction
|
||||
(.-eth web3)
|
||||
(clj->js {:to "0x2127edab5d08b1e11adf7ae4bae16c2b33fdf74a"
|
||||
:value (.toWei web3 "0.00002" "ether")})
|
||||
#(println "resss" % %2))))))))
|
||||
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
:contract-call-set
|
||||
(fn [{{:keys [web3 contract]} :db} [_ value]]
|
||||
|
|
|
@ -60,7 +60,8 @@
|
|||
[ui/button "Deploy simple contract" #(re-frame/dispatch [:deploy-contract (str (first accounts))])])
|
||||
[react/view {:style {:margin-top 30}}
|
||||
[ui/button "Send one Tx in batch" #(re-frame/dispatch [:send-batch-1tx])]
|
||||
[ui/button "Send two Txs in batch, 0.00001 and 0.00002 ETH" #(re-frame/dispatch [:send-batch-2tx])]]
|
||||
[ui/button "Send two Txs in batch, 0.00001 and 0.00002 ETH" #(re-frame/dispatch [:send-batch-2tx])]
|
||||
[ui/button "Send two Txs, one after another, 0.00001 and 0.00002 ETH" #(re-frame/dispatch [:send-2tx])]]
|
||||
[react/view {:style {:margin-top 30}}
|
||||
[ui/button "Test filters" #(re-frame/dispatch [:check-filters])]]]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue