Merge pull request #339 from hermeznetwork/feature/missing-deposit-name

Update missing LoadAmount to DepositAmount
This commit is contained in:
Eduard S
2020-12-10 12:15:38 +01:00
committed by GitHub
6 changed files with 8 additions and 8 deletions

View File

@@ -1768,7 +1768,7 @@ components:
example: true
historicDepositAmountUSD:
type: number
description: Load amount in USD, at the moment the transaction was made.
description: Deposit amount in USD, at the moment the transaction was made.
example: 3.897
nullable: true
ethereumBlockNum:
@@ -2974,7 +2974,7 @@ components:
example: 1
limitDepositAmount:
type: integer
description: Maximum load amount (L1 to L2) allowed.
description: Maximum deposit amount (L1 to L2) allowed.
example: 321
limitL2TransferAmount:
type: integer

View File

@@ -166,9 +166,9 @@ func genTestTxs(
}
laf := new(big.Float).SetInt(l1.DepositAmount)
depositAmountFloat, _ := laf.Float64()
loadUSD := *token.USD * depositAmountFloat / math.Pow(10, float64(token.Decimals))
depositUSD := *token.USD * depositAmountFloat / math.Pow(10, float64(token.Decimals))
if depositAmountFloat != 0 {
tx.L1Info.HistoricDepositAmountUSD = &loadUSD
tx.L1Info.HistoricDepositAmountUSD = &depositUSD
}
}
txs = append(txs, tx)