Skip to content

Commit

Permalink
fix: add address to Pod object
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Kim committed Nov 8, 2022
1 parent f2cb046 commit 9411cbe
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 63 deletions.
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

67 changes: 34 additions & 33 deletions docs/classes/Pod.html

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions docs/classes/Proposal.html

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions docs/modules.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion scripts/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const multiPodInput = [
async function main() {
const { walletOne } = setup(5);

const pod = await getPod('orca.pod.eth');
const pod = await getPod(25);

console.log('pod', pod);
}
Expand Down
4 changes: 4 additions & 0 deletions src/Pod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default class Pod {
this.admin = fetchedAdmin === ethers.constants.AddressZero ? null : fetchedAdmin;
this.id = podId;
this.safe = safe;
this.address = this.safe;
this.ensName = Name.name;

const baseUrl = `https://orcaprotocol-nft.vercel.app${
Expand Down Expand Up @@ -149,6 +150,9 @@ export default class Pod {
/** @property Gnosis Safe address */
safe: string;

/** @property Gnosis Safe address, duplicate of `safe` */
address: string;

/** @property Current nonce, i.e., the nonce of the active proposal */
nonce: number;

Expand Down
1 change: 1 addition & 0 deletions test/pod.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ test('getPod should be able to fetch via address', async () => {
const pod = await getPod(orcanautAddress);
expect(pod.id).toEqual(orcanautPod.id);
expect(pod.safe).toEqual(orcanautPod.safe);
expect(pod.address).toEqual(pod.safe);
expect(pod.imageNoTextUrl).toEqual(orcanautPod.imageNoTextUrl);
expect(pod.admin).toEqual(orcanautPod.admin);
expect(pod.ensName).toEqual(orcanautPod.ensName);
Expand Down

0 comments on commit 9411cbe

Please sign in to comment.