Skip to content

Commit

Permalink
feat: add flag to indicate if connector is external (#3201)
Browse files Browse the repository at this point in the history
* feat: add flag to indicate if connector is external

* chore: changeset
  • Loading branch information
arthurgeron authored Sep 23, 2024
1 parent ef50619 commit b869ee8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/small-readers-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fuel-ts/account": patch
---

feat: add flag to indicate if connector is external
4 changes: 4 additions & 0 deletions apps/docs/src/guide/wallets/connectors.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ The `name` property is simply a `string` on the connector that serves as an iden

<<< @/../../docs-snippets/src/guide/wallets/connectors.test.ts#fuel-connector-name{ts:line-numbers}

### `external`
The `external` property is simply a `boolean` that indicates when a connector is external or not.
Connectors are considered external, or non-native, when they do not support the Fuel Network (e.g. `Solana`, `WalletConnect`).

#### `metadata`

The `metadata` property on the connector provides additional information about the connector. This information will be displayed to the end-user when selecting a connector. The following is the structure of the `metadata` object:
Expand Down
1 change: 1 addition & 0 deletions packages/account/src/connectors/fuel-connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export abstract class FuelConnector extends EventEmitter implements Connector {
metadata: ConnectorMetadata = {} as ConnectorMetadata;
connected: boolean = false;
installed: boolean = false;
external: boolean = true;
events = FuelConnectorEventTypes;

/**
Expand Down

0 comments on commit b869ee8

Please sign in to comment.