mirror of
https://github.com/status-im/status-react.git
synced 2025-01-11 11:34:45 +00:00
bug #4832 - not showing erc721 in transaction history as if it was erc20
Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
parent
3030c10c5f
commit
63da0ffb50
@ -87,36 +87,37 @@
|
|||||||
(keep identity
|
(keep identity
|
||||||
(for [transfer transfers]
|
(for [transfer transfers]
|
||||||
(if-let [token (->> transfer :address (tokens/address->token chain))]
|
(if-let [token (->> transfer :address (tokens/address->token chain))]
|
||||||
[(:transactionHash transfer)
|
(when-not (:nft? token)
|
||||||
{:block (-> block-info :number str)
|
[(:transactionHash transfer)
|
||||||
:hash (:transactionHash transfer)
|
{:block (-> block-info :number str)
|
||||||
:symbol (:symbol token)
|
:hash (:transactionHash transfer)
|
||||||
:from (-> transfer :topics second remove-padding)
|
:symbol (:symbol token)
|
||||||
:to (-> transfer :topics last remove-padding)
|
:from (-> transfer :topics second remove-padding)
|
||||||
:value (-> transfer :data ethereum/hex->bignumber)
|
:to (-> transfer :topics last remove-padding)
|
||||||
:type direction
|
:value (-> transfer :data ethereum/hex->bignumber)
|
||||||
|
:type direction
|
||||||
|
|
||||||
:confirmations (str (- current-block-number (-> transfer :blockNumber ethereum/hex->int)))
|
:confirmations (str (- current-block-number (-> transfer :blockNumber ethereum/hex->int)))
|
||||||
|
|
||||||
:gas-price nil
|
:gas-price nil
|
||||||
:nonce nil
|
:nonce nil
|
||||||
:data nil
|
:data nil
|
||||||
|
|
||||||
:gas-limit nil
|
:gas-limit nil
|
||||||
:timestamp (-> block-info :timestamp (* 1000) str)
|
:timestamp (-> block-info :timestamp (* 1000) str)
|
||||||
|
|
||||||
:gas-used nil
|
:gas-used nil
|
||||||
|
|
||||||
;; NOTE(goranjovic) - metadata on the type of token: contains name, symbol, decimas, address.
|
;; NOTE(goranjovic) - metadata on the type of token: contains name, symbol, decimas, address.
|
||||||
:token token
|
:token token
|
||||||
|
|
||||||
;; NOTE(goranjovic) - if an event has been emitted, we can say there was no error
|
;; NOTE(goranjovic) - if an event has been emitted, we can say there was no error
|
||||||
:error? false
|
:error? false
|
||||||
|
|
||||||
;; NOTE(goranjovic) - just a flag we need when we merge this entry with the existing entry in
|
;; NOTE(goranjovic) - just a flag we need when we merge this entry with the existing entry in
|
||||||
;; the app, e.g. transaction info with gas details, or a previous transfer entry with old
|
;; the app, e.g. transaction info with gas details, or a previous transfer entry with old
|
||||||
;; confirmations count.
|
;; confirmations count.
|
||||||
:transfer true}])))))
|
:transfer true}]))))))
|
||||||
|
|
||||||
(defn add-block-info [web3 current-block-number chain direction result success-fn]
|
(defn add-block-info [web3 current-block-number chain direction result success-fn]
|
||||||
(let [transfers-by-block (group-by :blockNumber result)]
|
(let [transfers-by-block (group-by :blockNumber result)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user