Skip to content

Commit

Permalink
chore(dot-org): use walletconnect.org for the relay and rpc urls
Browse files Browse the repository at this point in the history
  • Loading branch information
Cali93 committed Sep 26, 2024
1 parent 89d492d commit e989319
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 20,629 deletions.
20,605 changes: 1 addition & 20,604 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/core/src/constants/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ export const EVENTS_STORAGE_CONTEXT = "event-client";

export const EVENTS_STORAGE_CLEANUP_INTERVAL = 86400;

export const EVENTS_CLIENT_API_URL = "https://pulse.walletconnect.com/batch";
export const EVENTS_CLIENT_API_URL = "https://pulse.walletconnect.org/batch";
2 changes: 1 addition & 1 deletion packages/sign-client/src/constants/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const SIGN_CLIENT_DEFAULT = {
name: SIGN_CLIENT_CONTEXT,
logger: "error",
controller: false,
relayUrl: "wss://relay.walletconnect.com",
relayUrl: "wss://relay.walletconnect.org",
};

export const SIGN_CLIENT_EVENTS: Record<SignClientTypes.Event, SignClientTypes.Event> = {
Expand Down
8 changes: 4 additions & 4 deletions packages/sign-client/test/shared/values.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { SignClientTypes, RelayerTypes } from "@walletconnect/types";
import { RelayerTypes, SignClientTypes } from "@walletconnect/types";

export const PACKAGE_NAME = "sign-client";

export const TEST_RELAY_URL = process.env.TEST_RELAY_URL
? process.env.TEST_RELAY_URL
: "ws://0.0.0.0:5555";

export const TEST_RELAY_URL_US = "wss://us-east-1.relay.walletconnect.com";
export const TEST_RELAY_URL_EU = "wss://eu-central-1.relay.walletconnect.com";
export const TEST_RELAY_URL_AP = "wss://ap-southeast-1.relay.walletconnect.com";
export const TEST_RELAY_URL_US = "wss://us-east-1.relay.walletconnect.org";
export const TEST_RELAY_URL_EU = "wss://eu-central-1.relay.walletconnect.org";
export const TEST_RELAY_URL_AP = "wss://ap-southeast-1.relay.walletconnect.org";

// See https://github.com/WalletConnect/push-webhook-test-server
export const TEST_WEBHOOK_ENDPOINT = "https://webhook-push-test.walletconnect.com/";
Expand Down
4 changes: 2 additions & 2 deletions packages/utils/src/signatures.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AuthTypes } from "@walletconnect/types";
import { hashMessage } from "@ethersproject/hash";
import { recoverAddress } from "@ethersproject/transactions";
const DEFAULT_RPC_URL = "https://rpc.walletconnect.com/v1";
import { AuthTypes } from "@walletconnect/types";
const DEFAULT_RPC_URL = "https://rpc.walletconnect.org/v1";

export async function verifySignature(
address: string,
Expand Down
9 changes: 3 additions & 6 deletions packages/utils/test/cacao.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { describe, expect, it } from "vitest";
import {
base64Encode,
buildNamespacesFromAuth,
createEncodedRecap,
createRecap,
decodeRecap,
encodeRecap,
formatMessage,
formatStatementFromRecap,
getChainsFromRecap,
getCommonValuesInArrays,
getDecodedRecapFromResources,
Expand All @@ -22,7 +19,7 @@ describe("URI", () => {
it("should merge recaps", () => {
const recap1 = {
att: {
"https://notify.walletconnect.com": { "manage/all-apps-notifications": [{}] },
"https://notify.walletconnect.org": { "manage/all-apps-notifications": [{}] },
},
};
const recap2 = {
Expand All @@ -43,7 +40,7 @@ describe("URI", () => {
"request/eth_signTypedData_v4": [{}],
"request/personal_sign": [{}],
},
"https://notify.walletconnect.com": { "manage/all-apps-notifications": [{}] },
"https://notify.walletconnect.org": { "manage/all-apps-notifications": [{}] },
},
};
expect(JSON.stringify(recap)).to.eql(JSON.stringify(expected));
Expand Down Expand Up @@ -249,7 +246,7 @@ describe("URI", () => {
expect(message).to.include("(1)");
expect(message).to.include("(2)");
expect(message).to.include(
"I further authorize the stated URI to perform the following actions on my behalf: (1) 'request': 'eth_sendTransaction', 'personal_sign' for 'eip155'. (2) 'manage': 'all-apps-notifications' for 'https://notify.walletconnect.com'.",
"I further authorize the stated URI to perform the following actions on my behalf: (1) 'request': 'eth_sendTransaction', 'personal_sign' for 'eip155'. (2) 'manage': 'all-apps-notifications' for 'https://notify.walletconnect.org'.",
);

expect(message).to.include("Version: 1");
Expand Down
8 changes: 4 additions & 4 deletions packages/utils/test/misc.spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { expect, describe, it, vi, beforeEach, afterEach } from "vitest";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import {
calcExpiry,
isExpired,
formatRelayRpcUrl,
hasOverlap,
formatUA,
getSearchParamFromURL,
hasOverlap,
isExpired,
} from "../src";

const RELAY_URL = "wss://relay.walletconnect.com";
const RELAY_URL = "wss://relay.walletconnect.org";

const PROJECT_ID = "27e484dcd9e3efcfd25a83a78777cdf1";

Expand Down
2 changes: 1 addition & 1 deletion providers/ethereum-provider/src/constants/values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export const PROTOCOL = "wc";
export const WC_VERSION = 2;
export const CONTEXT = "ethereum_provider";
export const STORAGE_KEY = `${PROTOCOL}@${WC_VERSION}:${CONTEXT}:`;
export const RPC_URL = "https://rpc.walletconnect.com/v1/";
export const RPC_URL = "https://rpc.walletconnect.org/v1/";
8 changes: 4 additions & 4 deletions providers/universal-provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ await provider.connect({
chains: ["eip155:80001"],
events: ["chainChanged", "accountsChanged"],
rpcMap: {
80001: "https://rpc.walletconnect.com?chainId=eip155:80001&projectId=<your walletconnect project id>",
80001:
"https://rpc.walletconnect.org?chainId=eip155:80001&projectId=<your walletconnect project id>",
},
},
pairingTopic: "<123...topic>", // optional topic to connect to
Expand Down Expand Up @@ -122,6 +123,5 @@ const updatedDefaultChainId = await web3.eth.getChainId();
- The rest of the methods of the class are very similar, mainly centering around
httpProvider and for the most part will be 90% similar to other providers
given similar structure of chainId. For example `eip155:1` or
`solana:mainnetBeta`.
- Export provider under `providers/universal-provider/src/providers/index.ts`

`solana:mainnetBeta`.
- Export provider under `providers/universal-provider/src/providers/index.ts`
4 changes: 2 additions & 2 deletions providers/universal-provider/src/constants/values.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
export const LOGGER = "error";

export const RELAY_URL = "wss://relay.walletconnect.com";
export const RELAY_URL = "wss://relay.walletconnect.org";

export const PROTOCOL = "wc";
export const WC_VERSION = 2;
export const CONTEXT = "universal_provider";

export const STORAGE = `${PROTOCOL}@${WC_VERSION}:${CONTEXT}:`;

export const RPC_URL = "https://rpc.walletconnect.com/v1/";
export const RPC_URL = "https://rpc.walletconnect.org/v1/";

export const GENERIC_SUBPROVIDER_NAME = "generic";

Expand Down

0 comments on commit e989319

Please sign in to comment.