@raac/rpc 1.1.0-beta.13 → 1.1.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,12 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getWithdrawRequestInfo = getWithdrawRequestInfo;
4
4
  const ethers_1 = require("ethers");
5
5
  const _helpers_1 = require("./_helpers");
6
- async function getWithdrawRequestInfo(chainId, userAddress, signer) {
7
- if (!signer) {
8
- throw new Error("Wallet not connected");
9
- }
6
+ async function getWithdrawRequestInfo(chainId, userAddress, provider) {
10
7
  try {
11
- const lendingPoolContract = await (0, _helpers_1.getLendingPoolContract)(chainId, signer);
8
+ const lendingPoolContract = await (0, _helpers_1.getLendingPoolContract)(chainId, provider);
12
9
  const request = await lendingPoolContract.withdrawTimelock(userAddress);
13
10
  if (request[0] === 0n) {
14
11
  return null;
@@ -1,8 +1,8 @@
1
- import { Signer } from "ethers";
1
+ import { Provider } from "ethers";
2
2
  import { ChainId } from "../../configs/chains";
3
3
  interface WithdrawRequestInfo {
4
4
  amount: string;
5
5
  readyAt: number;
6
6
  }
7
- export declare function getWithdrawRequestInfo(chainId: ChainId, userAddress: string, signer: Signer): Promise<WithdrawRequestInfo | null>;
7
+ export declare function getWithdrawRequestInfo(chainId: ChainId, userAddress: string, provider: Provider): Promise<WithdrawRequestInfo | null>;
8
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raac/rpc",
3
- "version": "1.1.0-beta.13",
3
+ "version": "1.1.0-beta.14",
4
4
  "description": "RPC Library for RAAC ",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/types/index.d.ts",