Skip to content

Commit fb2af73

Browse files
chore: added bundle id in secure site url, disable loader on auth provider timeout
1 parent acbdb55 commit fb2af73

File tree

9 files changed

+12
-13
lines changed

9 files changed

+12
-13
lines changed

apps/native/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ createAppKit({
7777
features: {
7878
email: true,
7979
socials: ['x', 'farcaster', 'discord', 'apple'],
80-
emailShowWallets: true
80+
emailShowWallets: true,
81+
swaps: true
8182
}
8283
});
8384

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"test": "turbo run test --parallel",
3232
"clean": "turbo clean && rm -rf node_modules && watchman watch-del-all",
3333
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\" --ignore-path .gitignore",
34-
"changeset:prepublish": "yarn run clean; yarn install; yarn version:update; yarn run lint && yarn run prettier; yarn run build; yarn run test;",
34+
"playwright:test": "cd apps/native && yarn playwright:test",
35+
"changeset:prepublish": "yarn run clean; yarn install; yarn version:update; yarn run lint && yarn run prettier; yarn run build; yarn run test",
3536
"changeset:publish": "yarn run changeset:prepublish; yarn run changeset publish --no-git-tag",
3637
"changeset:version": "changeset version; yarn run version:update; yarn install --refresh-lockfile",
3738
"version:update": "./scripts/bump-version.sh"

packages/core/src/controllers/SwapController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ export const SwapController = {
788788

789789
setTimeout(() => {
790790
TransactionsController.fetchTransactions(AccountController.state.address, true);
791-
}, 3000);
791+
}, 5000);
792792

793793
return transactionHash;
794794
} catch (err) {

packages/core/src/utils/TypeUtil.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,6 @@ export interface AppKitFrameProvider {
713713
getSecureSiteURL(): string;
714714
getSecureSiteDashboardURL(): string;
715715
getSecureSiteIconURL(): string;
716-
getSecureSiteHeaders(): Record<string, string>;
717716
getEmail(): string | undefined;
718717
getUsername(): string | undefined;
719718
getLastUsedChainId(): Promise<number | undefined>;

packages/ethers/src/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,7 @@ export class AppKit extends AppKitScaffold {
10121012

10131013
authProvider.setOnTimeout(async () => {
10141014
this.handleAlertError(ErrorUtil.ALERT_ERRORS.SOCIALS_TIMEOUT);
1015+
this.setLoading(false);
10151016
});
10161017
}
10171018

packages/ethers5/src/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -989,6 +989,7 @@ export class AppKit extends AppKitScaffold {
989989

990990
authProvider.setOnTimeout(async () => {
991991
this.handleAlertError(ErrorUtil.ALERT_ERRORS.SOCIALS_TIMEOUT);
992+
this.setLoading(false);
992993
});
993994
}
994995

packages/wagmi/src/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,7 @@ export class AppKit extends AppKitScaffold {
624624

625625
provider.setOnTimeout(async () => {
626626
this.handleAlertError(ErrorUtil.ALERT_ERRORS.SOCIALS_TIMEOUT);
627+
this.setLoading(false);
627628
});
628629
}
629630
}

packages/wallet/src/AppKitAuthWebview.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,7 @@ function _AuthWebview() {
167167
]}
168168
>
169169
<WebView
170-
source={{
171-
uri: provider.getSecureSiteURL(),
172-
headers: provider.getSecureSiteHeaders()
173-
}}
170+
source={{ uri: provider.getSecureSiteURL() }}
174171
bounces={false}
175172
scalesPageToFit
176173
onMessage={handleMessage}

packages/wallet/src/AppKitFrameProvider.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ export class AppKitFrameProvider {
8989

9090
// -- Extended Methods ------------------------------------------------
9191
public getSecureSiteURL() {
92-
return `${AppKitFrameConstants.SECURE_SITE_SDK}?projectId=${this.projectId}`;
92+
return `${AppKitFrameConstants.SECURE_SITE_SDK}?projectId=${
93+
this.projectId
94+
}&bundleId=${CoreHelperUtil.getBundleId()}`;
9395
}
9496

9597
public getSecureSiteDashboardURL() {
@@ -100,10 +102,6 @@ export class AppKitFrameProvider {
100102
return AppKitFrameConstants.SECURE_SITE_ICON;
101103
}
102104

103-
public getSecureSiteHeaders() {
104-
return { 'X-Bundle-Id': CoreHelperUtil.getBundleId() };
105-
}
106-
107105
public getEmail() {
108106
return this.email;
109107
}

0 commit comments

Comments
 (0)