fuels-wallet icon indicating copy to clipboard operation
fuels-wallet copied to clipboard

Adding connector type to fuel wallet SDK

Open sameoldlab opened this issue 11 months ago • 1 comments

Motivation

Currently all the end user wallets for fuel are browser extensions, but a future wallet could connect from mobile or desktop application. This might already be happening on bridging UIs. Knowing the type of wallet would help with displaying updates and components on the frontend.

Usage example

await fuel.selectConnector(connector.name)
fuel.connect()
if(connector.type === 'injected' {
    // show pending UI
} else if (connector.type === 'walletConnect') {
    // show QR code UI
}

Possible implementations

adding a string property to FuelConnector to indicate the type of wallet, i.e. injected, extension, mobile, scannable, sso, etc. Wallets that connect the same way would have the same type

sameoldlab avatar Feb 29 '24 12:02 sameoldlab

@luizstacio what you think on this one ??

LuizAsFight avatar Mar 24 '24 22:03 LuizAsFight