refactor: pgx supports big.Int type conversion internally

This commit is contained in:
Mohamed Sohail 2023-04-06 06:31:07 +00:00
parent e67a42ede3
commit 82294b96f8
Signed by: kamikazechaser
GPG Key ID: 7DD45520C01CD85D
4 changed files with 5 additions and 4 deletions

View File

@ -2,6 +2,7 @@ package store
import (
"context"
"math/big"
"github.com/grassrootseconomics/cic-custodial/pkg/enum"
)
@ -26,7 +27,7 @@ type (
Data string
GasLimit uint64
TransferValue uint64
GasPrice uint64
GasPrice *big.Int
Nonce uint64
}

View File

@ -149,7 +149,7 @@ func AccountRefillGasProcessor(cu *custodial.Custodial) func(context.Context, *a
TxHash: builtTx.Hash().Hex(),
From: cu.SystemPublicKey,
Data: hexutil.Encode(builtTx.Data()),
GasPrice: builtTx.GasPrice().Uint64(),
GasPrice: builtTx.GasPrice(),
GasLimit: builtTx.Gas(),
Nonce: builtTx.Nonce(),
})

View File

@ -89,7 +89,7 @@ func AccountRegisterOnChainProcessor(cu *custodial.Custodial) func(context.Conte
TxHash: builtTx.Hash().Hex(),
From: cu.SystemPublicKey,
Data: hexutil.Encode(builtTx.Data()),
GasPrice: builtTx.GasPrice().Uint64(),
GasPrice: builtTx.GasPrice(),
GasLimit: builtTx.Gas(),
Nonce: builtTx.Nonce(),
})

View File

@ -96,7 +96,7 @@ func SignTransfer(cu *custodial.Custodial) func(context.Context, *asynq.Task) er
TxHash: builtTx.Hash().Hex(),
From: payload.From,
Data: hexutil.Encode(builtTx.Data()),
GasPrice: builtTx.GasPrice().Uint64(),
GasPrice: builtTx.GasPrice(),
GasLimit: builtTx.Gas(),
TransferValue: payload.Amount,
Nonce: builtTx.Nonce(),