Skip to content

Commit f3e7c4b

Browse files
authored
feat: add bakosfe connector (#126)
1 parent a6af7f3 commit f3e7c4b

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

.changeset/blue-phones-obey.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@fuels/connectors": minor
3+
---
4+
5+
add bako safe connector to the default connectors

.changeset/olive-islands-cough.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@fuel-connectors/bako-safe": minor
3+
---
4+
5+
fix positioning/size of bako popup

packages/bako-safe/src/DAPPWindow.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,15 @@ export class DAppWindow {
2727
top: WINDOW.innerHeight / 2 - height / 2,
2828
left: WINDOW.innerWidth / 2 - width / 2,
2929
width,
30-
height: WINDOW.innerHeight >= height ? height : WINDOW.innerHeight,
30+
height:
31+
!this.isMobile && WINDOW.innerHeight >= height
32+
? height
33+
: WINDOW.innerHeight,
3134
};
3235
}
3336

3437
open(method: string, reject: (e: Error) => void) {
3538
if (this.isOpen) reject(new Error('Window is already open'));
36-
const _isConnection = !method.includes('/dapp/');
3739

3840
if (!this.isSafariBrowser) {
3941
// if is not safari, we can use popup for both cases
@@ -80,7 +82,7 @@ export class DAppWindow {
8082
frame.src = `${this.config.appUrl}${method}${this.queryString}${
8183
isSafari ? '&byConnector=true' : ''
8284
}`;
83-
frame.style.position = 'absolute';
85+
frame.style.position = 'fixed';
8486
frame.style.zIndex = '99999999';
8587
frame.style.top = `${w.top}`;
8688
frame.style.left = `${w.left}`;

packages/bako-safe/src/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export const APP_IMAGE_LIGHT =
99
'https://safe.bako.global/BAKO_CONNECTOR_ICON.svg';
1010

1111
export const APP_URL = 'https://safe.bako.global';
12-
export const HOST_URL = 'https://api-safe.bako.global';
13-
export const SOCKET_URL = 'https://api-safe.bako.global';
12+
export const HOST_URL = 'https://api.bako.global';
13+
export const SOCKET_URL = 'https://api.bako.global';
1414

1515
// Window object
1616
export const HAS_WINDOW = typeof window !== 'undefined';

packages/connectors/src/defaultConnectors.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { BakoSafeConnector } from '@fuel-connectors/bako-safe';
12
import { BurnerWalletConnector } from '@fuel-connectors/burner-wallet-connector';
23
import { FuelWalletDevelopmentConnector } from '@fuel-connectors/fuel-development-wallet';
34
import { FuelWalletConnector } from '@fuel-connectors/fuel-wallet';
@@ -14,6 +15,7 @@ export function defaultConnectors({
1415
}: DefaultConnectors = {}): Array<FuelConnector> {
1516
const connectors = [
1617
new FuelWalletConnector(),
18+
new BakoSafeConnector(),
1719
new FueletWalletConnector(),
1820
new WalletConnectConnector(),
1921
new BurnerWalletConnector(),

0 commit comments

Comments
 (0)