Skip to content

Commit

Permalink
Mock test account as society member, #1034
Browse files Browse the repository at this point in the history
  • Loading branch information
hyifeng committed Sep 4, 2024
1 parent b83b91c commit a18344f
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
const { NODE_API_ENDPOINT } = require("../../env");
const { isTestAccount } = require("../../utils");
const { fetchApi } = require("../../utils/fech.api");

async function getSocietyMember(network, address, height) {
if (isTestAccount(address)) {
return {
data: {
rank: 0,
strikes: 10,
vouching: null,
index: 0,
},
};
}
let url = `${NODE_API_ENDPOINT}/${network}/society/members/${address}`;
if (height) {
url = `${NODE_API_ENDPOINT}/${network}/society/members/${address}/height/${height}`;
Expand Down

0 comments on commit a18344f

Please sign in to comment.