fix: rename value to amount

This commit is contained in:
Gaze
2024-04-14 16:12:16 +07:00
parent f64b4f00b3
commit 13c25423c6
3 changed files with 6 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ import (
type OutPointBalance struct {
PkScript []byte
Id runes.RuneId
Value uint128.Uint128
Amount uint128.Uint128
Index uint32
PrevTxHash chainhash.Hash
PrevTxOutIndex uint32

View File

@@ -238,7 +238,7 @@ func mapRuneEntryTypeToParams(src runes.RuneEntry, blockHeight uint64) (gen.Crea
type outpointBalanceModel struct {
PkScript string
Id runes.RuneId
Value uint128.Uint128
Amount uint128.Uint128
Index uint32
PrevTxHash string
PrevTxOutIndex uint32
@@ -248,7 +248,7 @@ func mapOutPointBalanceTypeToModel(src entity.OutPointBalance) outpointBalanceMo
return outpointBalanceModel{
PkScript: hex.EncodeToString(src.PkScript),
Id: src.Id,
Value: src.Value,
Amount: src.Amount,
Index: src.Index,
PrevTxHash: src.PrevTxHash.String(),
PrevTxOutIndex: src.PrevTxOutIndex,
@@ -267,7 +267,7 @@ func mapOutPointBalanceModelToType(src outpointBalanceModel) (entity.OutPointBal
return entity.OutPointBalance{
PkScript: pkScript,
Id: src.Id,
Value: src.Value,
Amount: src.Amount,
Index: src.Index,
PrevTxHash: *prevTxHash,
PrevTxOutIndex: src.PrevTxOutIndex,

View File

@@ -268,7 +268,7 @@ func (p *Processor) processTx(ctx context.Context, tx *types.Transaction, blockH
runeTx.Inputs = append(runeTx.Inputs, &entity.OutPointBalance{
PkScript: pkScript,
Id: runeId,
Value: amount,
Amount: amount,
Index: uint32(inputIndex),
PrevTxHash: tx.TxIn[inputIndex].PreviousOutTxHash,
PrevTxOutIndex: tx.TxIn[inputIndex].PreviousOutIndex,
@@ -281,7 +281,7 @@ func (p *Processor) processTx(ctx context.Context, tx *types.Transaction, blockH
runeTx.Outputs = append(runeTx.Outputs, &entity.OutPointBalance{
PkScript: pkScript,
Id: runeId,
Value: amount,
Amount: amount,
Index: uint32(outputIndex),
})
}