Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Hide debug logs
Rūdolfs Ošiņš committed 3 years ago
commit 63e18571a03dee86cbfd6466acd3aa7821dec512
parent 38ba77c23b0a20c1d144514c080e01bf48f785b6
6 files changed +13 -13
modified cypress/support/e2e.ts
@@ -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;
    }
  }
modified src/Comment.svelte
@@ -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>

modified src/base/registrations/registrar.ts
@@ -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");
modified src/base/vesting/state.ts
@@ -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);
});
modified src/config.ts
@@ -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;
}
modified src/session.ts
@@ -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> {