Skip to content

Commit

Permalink
solve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
linhpn99 committed Aug 26, 2024
1 parent 8590510 commit 02e0c1a
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 137 deletions.
2 changes: 1 addition & 1 deletion gno.land/pkg/gnoclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type IClient interface {
AddPackage(cfg BaseTxCfg, msgs ...vm.MsgAddPackage) (*ctypes.ResultBroadcastTxCommit, error)

SignTx(tx std.Tx, accountNumber, sequenceNumber uint64) (*std.Tx, error)
BroadcastTxCommit(signedTx *std.Tx) (*ctypes.ResultBroadcastTxCommit, error)
BroadcastTx(signedTx *std.Tx) (*ctypes.ResultBroadcastTxCommit, error)

NewSponsorTransaction(cfg SponsorTxCfg, msgs ...std.Msg) (*std.Tx, error)
ExecuteSponsorTransaction(tx std.Tx, accountNumber, sequenceNumber uint64) (*ctypes.ResultBroadcastTxCommit, error)
Expand Down
9 changes: 6 additions & 3 deletions gno.land/pkg/gnoclient/client_txs.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func (c *Client) Run(cfg BaseTxCfg, msgs ...vm.MsgRun) (*ctypes.ResultBroadcastT
if err != nil {
return nil, err
}

return c.signAndBroadcastTxCommit(*tx, cfg.AccountNumber, cfg.SequenceNumber)
}

Expand Down Expand Up @@ -115,6 +116,7 @@ func (c *Client) Send(cfg BaseTxCfg, msgs ...bank.MsgSend) (*ctypes.ResultBroadc
if err != nil {
return nil, err
}

return c.signAndBroadcastTxCommit(*tx, cfg.AccountNumber, cfg.SequenceNumber)
}

Expand Down Expand Up @@ -162,6 +164,7 @@ func (c *Client) AddPackage(cfg BaseTxCfg, msgs ...vm.MsgAddPackage) (*ctypes.Re
if err != nil {
return nil, err
}

return c.signAndBroadcastTxCommit(*tx, cfg.AccountNumber, cfg.SequenceNumber)
}

Expand Down Expand Up @@ -300,12 +303,12 @@ func (c *Client) signAndBroadcastTxCommit(tx std.Tx, accountNumber, sequenceNumb
if err != nil {
return nil, err
}
return c.BroadcastTxCommit(signedTx)
return c.BroadcastTx(signedTx)
}

// BroadcastTxCommit marshals and broadcasts the signed transaction, returning the result.
// BroadcastTx marshals and broadcasts the signed transaction, returning the result.
// If the result has a delivery error, then return a wrapped error.
func (c *Client) BroadcastTxCommit(signedTx *std.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
func (c *Client) BroadcastTx(signedTx *std.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
if err := c.validateRPCClient(); err != nil {
return nil, err
}
Expand Down
Loading

0 comments on commit 02e0c1a

Please sign in to comment.