Skip to content

Commit

Permalink
intents: small changes to intents and wallet fee options api
Browse files Browse the repository at this point in the history
  • Loading branch information
marino39 committed Feb 27, 2024
1 parent 7b9557e commit c7d9cff
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 25 deletions.
22 changes: 11 additions & 11 deletions intents/intent.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions intents/intent.gen.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable */
// sequence-waas-intents v0.1.0 f671856a3104a7a8f1ab8957e5542b7f08a20fb8
// sequence-waas-intents v0.1.0 80bee7d15d1c82c2791adf35c50c7b9d70dc49bc
// --
// Code generated by [email protected] with typescript generator. DO NOT EDIT.
//
Expand All @@ -12,17 +12,17 @@ export const WebRPCVersion = "v1"
export const WebRPCSchemaVersion = "v0.1.0"

// Schema hash generated from your RIDL schema
export const WebRPCSchemaHash = "f671856a3104a7a8f1ab8957e5542b7f08a20fb8"
export const WebRPCSchemaHash = "80bee7d15d1c82c2791adf35c50c7b9d70dc49bc"

//
// Types
//


export enum FeeTokenType {
UNKNOWN = 'UNKNOWN',
ERC20_TOKEN = 'ERC20_TOKEN',
ERC1155_TOKEN = 'ERC1155_TOKEN'
unknown = 'unknown',
erc20Token = 'erc20Token',
erc1155Token = 'erc1155Token'
}

export interface Intent {
Expand Down
6 changes: 3 additions & 3 deletions intents/intent.ridl
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ struct FeeToken
- tokenID?: string

enum FeeTokenType: uint32
- UNKNOWN
- ERC20_TOKEN
- ERC1155_TOKEN
- unknown
- erc20Token
- erc1155Token

struct IntentResponseFeeOptions
- feeOptions: []FeeOption
Expand Down
2 changes: 1 addition & 1 deletion relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type RelayerFeeToken struct {
Decimals *uint32
LogoURL string
ContractAddress *common.Address
tokenID *big.Int
TokenID *big.Int
}

type RelayerFeeOption struct {
Expand Down
6 changes: 1 addition & 5 deletions wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,15 +586,11 @@ func (w *Wallet[C]) SendTransactions(ctx context.Context, signedTxns *SignedTran
return w.relayer.Relay(ctx, signedTxns, quote)
}

func (w *Wallet[C]) FeeOptions(ctx context.Context, txns Transactions) ([]*RelayerFeeOption, *RelayerFeeQuote, error) {
func (w *Wallet[C]) FeeOptions(ctx context.Context, signedTxs *SignedTransactions) ([]*RelayerFeeOption, *RelayerFeeQuote, error) {
if w.relayer == nil {
return []*RelayerFeeOption{}, nil, ErrRelayerNotSet
}

signedTxs, err := w.SignTransactions(ctx, txns)
if err != nil {
return nil, nil, fmt.Errorf("cannot sign transactions: %w", err)
}
return w.relayer.FeeOptions(ctx, signedTxs)
}

Expand Down

0 comments on commit c7d9cff

Please sign in to comment.