mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-01 01:30:46 +08:00
@@ -19,7 +19,7 @@ export class MockExtensionProvider extends ethers.providers.BaseProvider {
|
||||
constructor(network: ethers.providers.Networkish, address: string) {
|
||||
super(network);
|
||||
this.currentAddress = address;
|
||||
console.log("Creating Mock provider");
|
||||
console.debug("Creating Mock provider");
|
||||
}
|
||||
|
||||
get ready(): Promise<ethers.providers.Network> {
|
||||
@@ -98,7 +98,7 @@ export class MockExtensionProvider extends ethers.providers.BaseProvider {
|
||||
byzantium: true
|
||||
};
|
||||
default:
|
||||
console.log("Unknown method", method);
|
||||
console.debug("Unknown method", method);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -32,12 +32,12 @@
|
||||
|
||||
const selectReaction = (event: { detail: string }) => {
|
||||
// TODO: Once we allow adding reactions through the http-api, we should call it here.
|
||||
console.log(event.detail);
|
||||
console.debug(event.detail);
|
||||
};
|
||||
|
||||
const incrementReaction = (event: { detail: string }) => {
|
||||
// TODO: Once we allow increment reactions through the http-api, we should call it here.
|
||||
console.log(event.detail);
|
||||
console.debug(event.detail);
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ export const state = writable<Connection>({ connection: State.Connecting });
|
||||
window.registrarState = state;
|
||||
|
||||
state.subscribe((s: Connection) => {
|
||||
console.log("register.state", s);
|
||||
console.debug("register.state", s);
|
||||
});
|
||||
|
||||
export async function getRegistration(name: string, config: Config, resolver?: EnsResolver | null): Promise<Registration | null> {
|
||||
@@ -317,7 +317,7 @@ async function register(name: string, owner: string, salt: Uint8Array, config: C
|
||||
);
|
||||
state.set({ connection: State.Registering });
|
||||
|
||||
console.log("Sent", tx);
|
||||
console.debug("Sent", tx);
|
||||
|
||||
await tx.wait();
|
||||
window.localStorage.removeItem("commitment");
|
||||
|
||||
@@ -14,5 +14,5 @@ export enum State {
|
||||
export const state = writable(State.Idle);
|
||||
|
||||
state.subscribe(s => {
|
||||
console.log("vesting.state", s);
|
||||
console.debug("vesting.state", s);
|
||||
});
|
||||
|
||||
+3
-3
@@ -242,8 +242,8 @@ export async function getConfig(): Promise<Config> {
|
||||
: null;
|
||||
const metamaskSigner = metamask?.getSigner() || null;
|
||||
|
||||
console.log("metamask", metamask);
|
||||
console.log("metamaskSigner", metamaskSigner);
|
||||
console.debug("metamask", metamask);
|
||||
console.debug("metamaskSigner", metamaskSigner);
|
||||
|
||||
let network = { name: "homestead", chainId: 1 };
|
||||
if (metamask) {
|
||||
@@ -263,7 +263,7 @@ export async function getConfig(): Promise<Config> {
|
||||
provider,
|
||||
metamaskSigner,
|
||||
);
|
||||
console.log("config", cfg);
|
||||
console.debug("config", cfg);
|
||||
|
||||
return cfg;
|
||||
}
|
||||
|
||||
+3
-3
@@ -116,7 +116,7 @@ export const loadState = (initial: State): Store => {
|
||||
|
||||
try {
|
||||
await config.walletConnect.client.connect();
|
||||
console.log("WalletConnect: connected.");
|
||||
console.debug("WalletConnect: connected.");
|
||||
|
||||
const address = await signer.getAddress();
|
||||
const tokenBalance: BigNumber = await config.token.balanceOf(address);
|
||||
@@ -156,7 +156,7 @@ export const loadState = (initial: State): Store => {
|
||||
|
||||
store.set({ connection: Connection.Connected, session });
|
||||
} catch (e: any) {
|
||||
console.log("WalletConnect: connection failed.");
|
||||
console.debug("WalletConnect: connection failed.");
|
||||
store.set({ connection: Connection.Disconnected });
|
||||
|
||||
// There seems to be no way to detect this "error" caused by the user
|
||||
@@ -351,7 +351,7 @@ export async function connectSeed(seedSession: { id: string; session: SeedSessio
|
||||
}
|
||||
|
||||
state.subscribe(s => {
|
||||
console.log("session.state", s);
|
||||
console.debug("session.state", s);
|
||||
});
|
||||
|
||||
export async function approveSpender(spender: string, amount: BigNumber, config: Config): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user