Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(keyring-api): add bridge transaction type #251

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/keyring-api/src/api/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ export enum TransactionType {
* A swap transaction must be originated by the account.
*/
Swap = 'swap',

/**
* The transaction is a bridge. It moves assets between chains.
*
* A bridge transaction must be originated by the account and it's a
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me from this description if a transaction marked as bridge is a send or a receive transaction. Should we have two types? bridge-send and bridge-receive?

* `receive` transaction on the destination chain.
*/
Bridge = 'bridge',
}

/**
Expand Down Expand Up @@ -262,6 +270,7 @@ export const TransactionStruct = object({
`${TransactionType.Send}`,
`${TransactionType.Receive}`,
`${TransactionType.Swap}`,
`${TransactionType.Bridge}`,
]),

/**
Expand Down
Loading