Skip to content

Commit

Permalink
Merge branch 'main' into lf/feat/remove-fuels-ui-from-web-wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
leocourbassier authored Oct 2, 2024
2 parents 41c6c5e + 0af19a8 commit b15cdfc
Show file tree
Hide file tree
Showing 29 changed files with 63 additions and 17 deletions.
2 changes: 2 additions & 0 deletions packages/bako-safe/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @fuel-connectors/bako-safe

## 0.29.5

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/bako-safe/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fuel-connectors/bako-safe",
"version": "0.29.4",
"version": "0.29.5",
"private": true,
"types": "./dist/index.d.ts",
"exports": {
Expand Down
6 changes: 6 additions & 0 deletions packages/burner-wallet-connector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @fuel-connectors/burner-wallet-connector

## 0.29.5

### Patch Changes

- [#318](https://github.com/FuelLabs/fuel-connectors/pull/318) [`01f20fb`](https://github.com/FuelLabs/fuel-connectors/commit/01f20fb80e221b5d0daa78743583424c683b382c) Thanks [@luizstacio](https://github.com/luizstacio)! - Call setup provider only on client side

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/burner-wallet-connector/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fuel-connectors/burner-wallet-connector",
"version": "0.29.4",
"version": "0.29.5",
"private": true,
"type": "module",
"types": "./dist/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
BURNER_WALLET_ICON,
BURNER_WALLET_PRIVATE_KEY,
BURNER_WALLET_STATUS,
HAS_WINDOW,
} from './constants';
import type { BurnerWalletConfig } from './types';

Expand Down Expand Up @@ -52,7 +53,9 @@ export class BurnerWalletConnector extends FuelConnector {
super();

this.storage = this.getStorage(config.storage);
this.configProvider(config);
if (HAS_WINDOW) {
this.configProvider(config);
}
}

private configProvider(config: BurnerWalletConfig = {}) {
Expand Down
2 changes: 2 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @fuel-connectors/common

## 0.29.5

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fuel-connectors/common",
"version": "0.29.4",
"version": "0.29.5",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions packages/connectors/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @fuels/connectors

## 0.29.5

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/connectors/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fuels/connectors",
"version": "0.29.4",
"version": "0.29.5",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
Expand Down
2 changes: 2 additions & 0 deletions packages/evm-connector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @fuel-connectors/evm-connector

## 0.29.5

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/evm-connector/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fuel-connectors/evm-connector",
"version": "0.29.4",
"version": "0.29.5",
"private": true,
"type": "module",
"files": ["dist"],
Expand Down
2 changes: 2 additions & 0 deletions packages/evm-predicates/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @fuel-connectors/evm-predicates

## 0.29.5

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/evm-predicates/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fuel-connectors/evm-predicates",
"version": "0.29.4",
"version": "0.29.5",
"private": true,
"type": "module",
"exports": {
Expand Down
2 changes: 2 additions & 0 deletions packages/fuel-development-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @fuel-connectors/fuel-development-wallet

## 0.29.5

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/fuel-development-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fuel-connectors/fuel-development-wallet",
"version": "0.29.4",
"version": "0.29.5",
"private": true,
"types": "./dist/index.d.ts",
"exports": {
Expand Down
2 changes: 2 additions & 0 deletions packages/fuel-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @fuel-connectors/fuel-wallet

## 0.29.5

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/fuel-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fuel-connectors/fuel-wallet",
"version": "0.29.4",
"version": "0.29.5",
"private": true,
"types": "./dist/index.d.ts",
"exports": {
Expand Down
2 changes: 2 additions & 0 deletions packages/fuelet-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @fuel-connectors/fuelet-wallet

## 0.29.5

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/fuelet-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fuel-connectors/fuelet-wallet",
"version": "0.29.4",
"version": "0.29.5",
"private": true,
"types": "./dist/index.d.ts",
"exports": {
Expand Down
2 changes: 2 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @fuels/react

## 0.29.5

## 0.29.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fuels/react",
"description": "Interact with the Fuel Wallet Extension in React.",
"version": "0.29.4",
"version": "0.29.5",
"license": "Apache-2.0",
"main": "./src/index.ts",
"exports": {
Expand Down
6 changes: 6 additions & 0 deletions packages/solana-connector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @fuel-connectors/solana-connector

## 0.29.5

### Patch Changes

- [#318](https://github.com/FuelLabs/fuel-connectors/pull/318) [`01f20fb`](https://github.com/FuelLabs/fuel-connectors/commit/01f20fb80e221b5d0daa78743583424c683b382c) Thanks [@luizstacio](https://github.com/luizstacio)! - Call setup provider only on client side

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/solana-connector/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fuel-connectors/solana-connector",
"version": "0.29.4",
"version": "0.29.5",
"private": true,
"type": "module",
"files": ["dist"],
Expand Down
6 changes: 4 additions & 2 deletions packages/solana-connector/src/SolanaConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
Provider as FuelProvider,
type TransactionRequestLike,
} from 'fuels';
import { SOLANA_ICON, TESTNET_URL } from './constants';
import { HAS_WINDOW, SOLANA_ICON, TESTNET_URL } from './constants';
import { PREDICATE_VERSIONS } from './generated/predicates';
import type { SolanaConfig } from './types';
import { type SolanaPredicateRoot, txIdEncoders } from './utils';
Expand All @@ -46,7 +46,9 @@ export class SolanaConnector extends PredicateConnector {
constructor(config: SolanaConfig) {
super();
this.customPredicate = config.predicateConfig || null;
this.configProviders(config);
if (HAS_WINDOW) {
this.configProviders(config);
}
}

private async _emitConnected(connected: boolean) {
Expand Down
2 changes: 2 additions & 0 deletions packages/solana-connector/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ export const DEFAULT_CHAINS = [
solanaChains.TESTNET,
solanaChains.DEVNET,
];

export const HAS_WINDOW = typeof window !== 'undefined';
6 changes: 6 additions & 0 deletions packages/walletconnect-connector/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @fuel-connectors/walletconnect-connector

## 0.29.5

### Patch Changes

- [#318](https://github.com/FuelLabs/fuel-connectors/pull/318) [`01f20fb`](https://github.com/FuelLabs/fuel-connectors/commit/01f20fb80e221b5d0daa78743583424c683b382c) Thanks [@luizstacio](https://github.com/luizstacio)! - Call setup provider only on client side

## 0.29.4

## 0.29.3
Expand Down
2 changes: 1 addition & 1 deletion packages/walletconnect-connector/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@fuel-connectors/walletconnect-connector",
"private": true,
"version": "0.29.4",
"version": "0.29.5",
"type": "module",
"files": ["dist"],
"main": "./dist/wallet-connector-walletconnect.umd.cjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { PREDICATE_VERSIONS } from '@fuel-connectors/evm-predicates';
import { ApiController } from '@web3modal/core';
import {
ETHEREUM_ICON,
HAS_WINDOW,
SINGATURE_VALIDATION_TIMEOUT,
WINDOW,
} from './constants';
Expand Down Expand Up @@ -72,7 +73,9 @@ export class WalletConnectConnector extends PredicateConnector {
config.storage || new LocalStorage(WINDOW?.localStorage as Storage);
const wagmiConfig = config?.wagmiConfig ?? createWagmiConfig();
this.customPredicate = config.predicateConfig || null;
this.configProviders({ ...config, wagmiConfig });
if (HAS_WINDOW) {
this.configProviders({ ...config, wagmiConfig });
}
this.loadPersistedConnection();
}

Expand Down
2 changes: 1 addition & 1 deletion packages/walletconnect-connector/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export const TESTNET_URL = 'https://testnet.fuel.network/v1/graphql';
// 1 minute timeout for request signature
export const SINGATURE_VALIDATION_TIMEOUT = 1000 * 60;

const HAS_WINDOW = typeof window !== 'undefined';
export const HAS_WINDOW = typeof window !== 'undefined';
export const WINDOW = HAS_WINDOW ? window : null;

0 comments on commit b15cdfc

Please sign in to comment.