Skip to content

Commit

Permalink
Send Ethereum style transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
palango committed Mar 25, 2024
1 parent f820ea1 commit f94cdcc
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions airgap/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,11 @@ type TxMetadata struct {

func (tm *TxMetadata) AsCallMessage() ethereum.CallMsg {
return ethereum.CallMsg{
From: tm.From,
GatewayFee: tm.GatewayFee,
GatewayFeeRecipient: tm.GatewayFeeRecipient,
GasPrice: tm.GasPrice,
To: &tm.To,
Data: tm.Data,
Value: tm.Value,
FeeCurrency: tm.FeeCurrency,
From: tm.From,
GasPrice: tm.GasPrice,
To: &tm.To,
Data: tm.Data,
Value: tm.Value,
}
}

Expand All @@ -151,15 +148,12 @@ func (tx *Transaction) Signed() bool {
}

func (tx *Transaction) AsGethTransaction() (*types.Transaction, error) {
gethTx := types.NewCeloTransaction(
gethTx := types.NewTransaction(
tx.Nonce,
tx.To,
tx.Value,
tx.Gas,
tx.GasPrice,
tx.FeeCurrency,
tx.GatewayFeeRecipient,
tx.GatewayFee,
tx.Data,
)
if tx.Signed() {
Expand Down

0 comments on commit f94cdcc

Please sign in to comment.