Skip to content

Commit

Permalink
fix: revert changes in test
Browse files Browse the repository at this point in the history
  • Loading branch information
ariesgun committed Oct 24, 2024
1 parent de783d3 commit 13253ac
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"@cspell/dict-software-terms": "3.4.6",
"@cspell/dict-typescript": "3.1.5",
"@eslint/js": "9.5.0",
"@ethersproject/providers": "^5.7.2",
"@jest/globals": "29.7.0",
"@mswjs/data": "0.16.1",
"@types/node": "20.14.5",
Expand Down
1 change: 0 additions & 1 deletion src/handlers/query-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export async function registerWallet(context: Context, body: string) {

// Makes sure that the address is check-summed
address = ethers.getAddress(address);

if (payload.comment) {
const { wallet } = adapters.supabase;
await wallet.upsertWalletAddress(context, address);
Expand Down
7 changes: 0 additions & 7 deletions tests/main.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, jest } from "@jest/globals";
import { ethers } from "ethers";
import { JsonRpcProvider } from "@ethersproject/providers";
import { plugin } from "../src/plugin";
import { PluginInputs } from "../src/types";
import { db } from "./__mocks__/db";
import { server } from "./__mocks__/node";
import commentCreatedPayload from "./__mocks__/payloads/comment-created.json";
import dbSeed from "./__mocks__/db-seed.json";
import { Logs } from "@ubiquity-os/ubiquity-os-logger";
import { RPCHandler } from "@ubiquity-dao/rpc-handler";

beforeAll(() => server.listen());
afterEach(() => server.resetHandlers());
Expand All @@ -34,11 +32,6 @@ describe("Wallet command tests", () => {
});

it("Should link a wallet", async () => {
jest
.spyOn(RPCHandler.prototype, "getFirstAvailableRpcProvider")
.mockResolvedValue(new JsonRpcProvider({ url: "https://fastethrpc.com", skipFetchSetup: true }, Number(1)));
jest.spyOn(JsonRpcProvider.prototype, "resolveName").mockResolvedValue("0xefC0e701A824943b469a694aC564Aa1efF7Ab7dd");

const spy = jest.spyOn(Logs.prototype, "ok");
await plugin(
{
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@
dependencies:
"@ethersproject/logger" "^5.7.0"

"@ethersproject/providers@5.7.2", "@ethersproject/providers@^5.7.2":
"@ethersproject/providers@5.7.2":
version "5.7.2"
resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.7.2.tgz#f8b1a4f275d7ce58cf0a2eec222269a08beb18cb"
integrity sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==
Expand Down

0 comments on commit 13253ac

Please sign in to comment.