mirror of
https://github.com/arnaucube/hermez-node.git
synced 2026-02-08 03:46:52 +01:00
Feature/merge history l2 tables (#156)
* WIP rebase * Combine both SQL DBs * API and DB refactor
This commit is contained in:
@@ -29,7 +29,9 @@ type L1Tx struct {
|
||||
LoadAmount *big.Int
|
||||
EthBlockNum int64 // Ethereum Block Number in which this L1Tx was added to the queue
|
||||
Type TxType
|
||||
BatchNum BatchNum
|
||||
BatchNum *BatchNum
|
||||
USD *float64
|
||||
LoadAmountUSD *float64
|
||||
}
|
||||
|
||||
// Tx returns a *Tx from the L1Tx
|
||||
@@ -52,11 +54,13 @@ func (tx *L1Tx) Tx() *Tx {
|
||||
FromBJJ: tx.FromBJJ,
|
||||
LoadAmount: tx.LoadAmount,
|
||||
EthBlockNum: tx.EthBlockNum,
|
||||
USD: tx.USD,
|
||||
LoadAmountUSD: tx.LoadAmountUSD,
|
||||
}
|
||||
if tx.LoadAmount != nil {
|
||||
lf := new(big.Float).SetInt(tx.LoadAmount)
|
||||
loadAmountFloat, _ := lf.Float64()
|
||||
genericTx.LoadAmountFloat = loadAmountFloat
|
||||
genericTx.LoadAmountFloat = &loadAmountFloat
|
||||
}
|
||||
return genericTx
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user