Skip to content

Commit bb31bcf

Browse files
authored
Merge pull request #214 from argentlabs/feat/rebranding-ready
Feat/rebranding
2 parents 539fee5 + c0a092d commit bb31bcf

File tree

23 files changed

+150
-84
lines changed

23 files changed

+150
-84
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ const wallet = await connect()
4949

5050
By default, the list of connectors is:
5151

52-
- Argent X
52+
- Ready Wallet
5353
- Braavos
54-
- Argent mobile
55-
- Argent webwallet
54+
- Ready (formerly Argent)
55+
- Web Wallet
5656

5757
## Connect with specific connectors
5858

src/connectors/argent/argentMobile/index.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import { isInArgentMobileAppBrowser } from "../helpers"
3535
import type { StarknetAdapter } from "./modal/starknet/adapter"
3636
import { ArgentX } from "../../injected/argentX"
3737
import { getModalWallet } from "../../../helpers/mapModalWallets"
38-
import { isMobileDevice } from "../../../helpers/navigator"
3938

4039
export interface ArgentMobileConnectorOptions {
4140
dappName: string
@@ -82,7 +81,7 @@ export class ArgentMobileBaseConnector extends Connector {
8281
}
8382

8483
get name(): string {
85-
return "Argent (mobile)"
84+
return "Ready (formerly Argent)"
8685
}
8786

8887
get icon(): ConnectorIcons {
@@ -209,6 +208,17 @@ export class ArgentMobileBaseConnector extends Connector {
209208
? publicRPCNode.mainnet
210209
: publicRPCNode.testnet)
211210

211+
// TODO: remove this when get-starknet will be updated
212+
const discoveryWallets = (await sn.getDiscoveryWallets()).map((wallet) => {
213+
if (wallet.id.toLowerCase() === "argentx") {
214+
return {
215+
...wallet,
216+
name: "Ready Wallet (formerly Argent)",
217+
}
218+
}
219+
return wallet
220+
})
221+
212222
const options = {
213223
onlyQRCode: props?.onlyQRCode,
214224
chainId: chainId ?? constants.NetworkName.SN_MAIN,
@@ -218,7 +228,7 @@ export class ArgentMobileBaseConnector extends Connector {
218228
url,
219229
icons,
220230
rpcUrl: providerRpcUrl,
221-
modalWallet: getModalWallet(this, await sn.getDiscoveryWallets()),
231+
modalWallet: getModalWallet(this, discoveryWallets),
222232
}
223233

224234
if (projectId === DEFAULT_PROJECT_ID) {

src/connectors/argent/argentMobile/modal/argentModal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ interface Urls {
3737
type ModalWalletExtended = ModalWallet & { dappName: string }
3838

3939
class ArgentModal {
40-
public bridgeUrl = "https://login.argent.xyz"
40+
public bridgeUrl = "https://login.ready.co"
4141
public mobileUrl = "argent://"
4242
public type: "overlay" | "window" = "overlay"
4343
public wcUri?: string

src/connectors/argent/argentMobile/modal/starknet/account.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ export class StarknetRemoteAccount extends Account implements AccountInterface {
4747
_contractPayload: DeclareContractPayload,
4848
_transactionsDetail?: InvocationsDetails | undefined,
4949
): Promise<DeclareContractResponse> {
50-
throw new Error("Not supported via Argent Login")
50+
throw new Error("Not supported via Ready Login")
5151
}
5252

5353
public async deployAccount(
5454
_contractPayload: any,
5555
_transactionsDetail?: InvocationsDetails | undefined,
5656
): Promise<DeployContractResponse> {
57-
throw new Error("Not supported via Argent Login")
57+
throw new Error("Not supported via Ready Login")
5858
}
5959
}

src/connectors/argent/argentMobile/modal/starknet/adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class StarknetAdapter
3838
implements StarknetWindowObject
3939
{
4040
id = "argentMobile"
41-
name = "Argent Mobile"
41+
name = "Ready (formerly Argent)"
4242
version = "0.1.0"
4343
icon = ""
4444
provider: ProviderInterface

src/connectors/argent/argentMobile/modal/starknet/signer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class StarknetRemoteSigner implements SignerInterface {
1414
constructor(private wallet: IStarknetRpc) {}
1515

1616
public async getPubKey(): Promise<string> {
17-
throw new Error("Not supported via Argent Login")
17+
throw new Error("Not supported via Ready Login")
1818
}
1919

2020
public async signMessage(
@@ -33,18 +33,18 @@ export class StarknetRemoteSigner implements SignerInterface {
3333
_transactionsDetail: InvocationsSignerDetails,
3434
_abis?: Abi[],
3535
): Promise<Signature> {
36-
throw new Error("Not supported via Argent Login")
36+
throw new Error("Not supported via Ready Login")
3737
}
3838

3939
public async signDeployAccountTransaction(
4040
_transaction: DeployAccountSignerDetails,
4141
): Promise<Signature> {
42-
throw new Error("Not supported via Argent Login")
42+
throw new Error("Not supported via Ready Login")
4343
}
4444

4545
public async signDeclareTransaction(
4646
_transaction: DeclareSignerDetails,
4747
): Promise<Signature> {
48-
throw new Error("Not supported via Argent Login")
48+
throw new Error("Not supported via Ready Login")
4949
}
5050
}

src/connectors/argent/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Argent
3434
readonly fallbackConnector: ArgentMobileBaseConnector | null
3535

3636
get name() {
37-
return "Argent"
37+
return "Ready Wallet (formerly Argent)"
3838
}
3939
get icon() {
4040
return ArgentIcon

src/connectors/injected/index.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface InjectedConnectorOptions {
3535
name?: string
3636
/** Wallet icons. */
3737
icon?: ConnectorIcons
38-
/** Used for StarknetReactWrapper/Argent connector + sn-react */
38+
/** Used for StarknetReactWrapper/Ready connector + sn-react */
3939
shouldEmit?: boolean
4040
}
4141

@@ -95,6 +95,12 @@ export class InjectedConnector extends Connector {
9595

9696
get name(): string {
9797
this.ensureWallet()
98+
99+
// TODO: remove when get-starknet is updated
100+
if (this._options.id.toLowerCase() === "argentx") {
101+
return "Ready Wallet (formerly Argent)"
102+
}
103+
98104
return this._options.name ?? this._wallet?.name ?? this._options.id
99105
}
100106

@@ -173,7 +179,7 @@ export class InjectedConnector extends Connector {
173179
}
174180

175181
/**
176-
* @dev This emit ensures compatibility of Argent connector with starknet-react
182+
* @dev This emit ensures compatibility of Ready connector with starknet-react
177183
*/
178184
if (this._options.shouldEmit) {
179185
this.emit("connectionStatus", "init")
@@ -216,7 +222,7 @@ export class InjectedConnector extends Connector {
216222
*/
217223
this.emit("connect", { account, chainId })
218224
/**
219-
* @dev This emit ensures compatibility of Argent connector with starknet-react
225+
* @dev This emit ensures compatibility of Ready connector with starknet-react
220226
*/
221227
if (this._options.shouldEmit) {
222228
this.emit("connectionStatus", "success")

src/connectors/webwallet/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const DEFAULT_WEBWALLET_URL = "https://web.argent.xyz"
1+
export const DEFAULT_WEBWALLET_URL = "https://web.ready.co"
22

33
export const DEFAULT_WEBWALLET_ICON = `<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
44
<rect x="2" y="2" width="28" height="28" rx="5.6" fill="black"/>

src/connectors/webwallet/helpers/mapTargetUrlToNodeUrl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function mapTargetUrlToNodeUrl(target: string): string {
1313
if (origin.includes("staging")) {
1414
return publicRPCNode.mainnet
1515
}
16-
if (origin.includes("argent.xyz")) {
16+
if (origin.includes("ready.co")) {
1717
return publicRPCNode.mainnet
1818
}
1919
} catch (e) {

0 commit comments

Comments
 (0)