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/required features #324

Open
wants to merge 8 commits into
base: feat/extra-currency
Choose a base branch
from

Conversation

mois-ilya
Copy link

No description provided.

@mois-ilya mois-ilya force-pushed the feat/required-features branch from 5e3e523 to 58619ce Compare March 3, 2025 10:19
@@ -209,9 +200,9 @@ export class WalletsListManager {

if (sseBridge) {
if (
!('url' in sseBridge) ||
!(sseBridge && typeof sseBridge === 'object' && 'url' in sseBridge) ||
Copy link
Author

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> = {
Copy link
Author

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' ||
Copy link
Author

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;
Copy link
Author

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 = {
Copy link
Author

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;
Copy link
Author

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 {
Copy link
Author

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);
Copy link
Author

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;
Copy link
Author

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()}>
Copy link
Author

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
Copy link
Author

Choose a reason for hiding this comment

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

Fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant