-
Notifications
You must be signed in to change notification settings - Fork 146
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/required features #324
base: feat/extra-currency
Are you sure you want to change the base?
Feat/required features #324
Conversation
… error code for missing features
…lets in mobile connection modal
5e3e523
to
58619ce
Compare
@@ -209,9 +200,9 @@ export class WalletsListManager { | |||
|
|||
if (sseBridge) { | |||
if ( | |||
!('url' in sseBridge) || | |||
!(sseBridge && typeof sseBridge === 'object' && 'url' in sseBridge) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check exception
@@ -1,6 +1,10 @@ | |||
import type { Property } from 'csstype'; | |||
type Color = Property.Color; | |||
|
|||
type DeepPartial<T> = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
@@ -220,7 +211,11 @@ export class WalletsListManager { | |||
const jsBridge = bridge.find(item => (item as { type: string }).type === 'js'); | |||
|
|||
if (jsBridge) { | |||
if (!('key' in jsBridge) || !(jsBridge as { key: string }).key) { | |||
if ( | |||
typeof jsBridge !== 'object' || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check exception
@@ -18,6 +18,7 @@ export interface ConnectEventError { | |||
payload: { | |||
code: CONNECT_EVENT_ERROR_CODES; | |||
message: string; | |||
device?: DeviceInfo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove changes in protocolo
extraCurrencyRequired?: boolean; | ||
}; | ||
|
||
export type RequireSignDataFeature = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove signData
}; | ||
|
||
class ConnectErrorsParser { | ||
parseError(error: ConnectEventError['payload']): TonConnectError { | ||
let ErrorConstructor: typeof TonConnectError = UnknownError; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to another function
/** | ||
* Thrown when wallet can't get manifest by passed manifestUrl. | ||
*/ | ||
export class MissingRequiredFeaturesError extends TonConnectError { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe need use generic for device
@@ -35,6 +37,8 @@ export interface TonConnectOptions { | |||
*/ | |||
walletsListCacheTTLMs?: number; | |||
|
|||
walletsRequiredFeatures?: RequireFeature[] | ((features: Feature[]) => boolean); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add descriptioins
/** | ||
* Indicates if the wallet supports required features. | ||
*/ | ||
isSupportRequiredFeatures: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check in UIWalletList, for injected wallets
<WalletsContainerStyled> | ||
<For each={props.walletsList.slice(0, 3)}> | ||
<For each={visibleWallets()}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add case than visibleWallets().length === 0
@@ -26,6 +27,11 @@ export interface TonConnectUiOptions { | |||
*/ | |||
walletsListConfiguration?: WalletsListConfiguration; | |||
|
|||
/** | |||
* TODO: add description |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix
No description provided.