mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-18 19:30:27 +08:00
+1
-1
@@ -24,7 +24,7 @@
|
||||
const onConnect = async () => {
|
||||
try {
|
||||
await state.connectWalletConnect(config);
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
walletConnectState.set({ state: "close" });
|
||||
error = e;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
state.status = Status.Pending;
|
||||
await tx.wait();
|
||||
state.status = Status.Success;
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
console.error(e);
|
||||
error = e;
|
||||
state = { status: Status.Failed, error: e.message };
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
let receipt = await tx.wait();
|
||||
org = Org.fromReceipt(receipt);
|
||||
state = State.Success;
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
console.error(e);
|
||||
|
||||
state = State.Idle;
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
await tx.wait();
|
||||
state = State.Success;
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
console.error(e);
|
||||
state = State.Failed;
|
||||
error = e.message;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
const result = await proj.getInfo(project.id, config);
|
||||
state = { status: Status.Loaded };
|
||||
info = result;
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
console.error(err.message);
|
||||
state = { status: Status.Error, error: err.message };
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
} else {
|
||||
state = State.NameUnavailable;
|
||||
}
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
state = State.CheckingFailed;
|
||||
error = err.message;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
onMount(async () => {
|
||||
try {
|
||||
await registerName(subdomain, registrationOwner, config);
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
console.error("Error", e);
|
||||
|
||||
state.set({ connection: State.Failed });
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
state.status = Status.Pending;
|
||||
await tx.wait();
|
||||
state.status = Status.Success;
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
console.error(e);
|
||||
state = { status: Status.Failed, error: e.message };
|
||||
}
|
||||
|
||||
@@ -138,7 +138,11 @@ export async function getSeed(name: string, config: Config, resolver?: EnsResolv
|
||||
resolver.getText('eth.radicle.seed.api'),
|
||||
]);
|
||||
|
||||
return new Seed(host, id, git, api);
|
||||
if (! host || ! id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Seed(host, id, git ?? undefined, api ?? undefined);
|
||||
}
|
||||
|
||||
export function registrar(config: Config): ethers.Contract {
|
||||
@@ -166,7 +170,7 @@ export async function registerName(name: string, owner: string, config: Config):
|
||||
} else {
|
||||
await commitAndRegister(name, owner, config);
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
throw { type: e.type || Failure.TransactionFailed, message: e.message, txHash: e.txHash };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
await tx.wait();
|
||||
state = State.Success;
|
||||
}
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
console.error(e);
|
||||
state = State.Failed;
|
||||
error = e.message;
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@ export class Profile {
|
||||
formatCAIP10Address(address, "eip155", config.network.chainId), config
|
||||
);
|
||||
return { address, idx: idx ?? undefined };
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
// Look for the No DID found for error by the resolveIdxProfile fn and send it to console.debug
|
||||
if (e.message.match("No DID found for")) console.debug(e.message);
|
||||
else console.error(e);
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ export const loadState = (initial: State): Store => {
|
||||
});
|
||||
|
||||
store.set({ connection: Connection.Connected, session });
|
||||
} catch (e) {
|
||||
} catch (e: any) {
|
||||
console.log("WalletConnect: connection failed.");
|
||||
store.set({ connection: Connection.Disconnected });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user