Skip to content

Commit

Permalink
Add update apis
Browse files Browse the repository at this point in the history
  • Loading branch information
kikakkz committed Jul 10, 2024
1 parent ca28897 commit 6985754
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ func CreateTransaction(ctx context.Context, in *npool.CreateTransactionRequest)
return nil
}

func UpdateTransaction(ctx context.Context, in *npool.UpdateTransactionRequest) error {
_, err := do(ctx, func(_ctx context.Context, cli npool.SphinxProxyClient) (cruder.Any, error) {
_, err := cli.UpdateTransaction(ctx, in)
if err != nil {
return nil, err
}
return nil, nil
})
if err != nil {
return err
}
return nil
}

func GetTransaction(ctx context.Context, id string) (*npool.TransactionInfo, error) {
info, err := do(ctx, func(_ctx context.Context, cli npool.SphinxProxyClient) (cruder.Any, error) {
resp, err := cli.GetTransaction(ctx, &npool.GetTransactionRequest{
Expand Down

0 comments on commit 6985754

Please sign in to comment.