Skip to content

Commit

Permalink
fix(apis.ts):fix get default chain id bug
Browse files Browse the repository at this point in the history
  • Loading branch information
druid3122 committed Jul 26, 2023
1 parent ba42022 commit afec428
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nulink_network/nulink-web-agent-access-sdk",
"version": "0.2.0",
"version": "0.2.1",
"main": "dist/index.js",
"typings": "build/index.d.ts",
"repository": "https://github.com/NuLink-network/nulink-web-agent-access-sdk.git",
Expand Down
6 changes: 3 additions & 3 deletions src/api/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,21 +277,21 @@ export const getFileDetail = async (
fileId: string,
fileUserAccountId: string
): Promise<FileData> => {
const _chainId = await storage.getItem(cache_chain_id);
const _chainId = await getNetWorkChainId();
let result = await axios.post(nulink_agent_config.backend_address + '/file/detail', {consumer_id: fileUserAccountId, file_id: fileId, chain_id: _chainId})
return result.data
};

export const getSendApplyFiles = async (proposerId: string, status:number = 0, pageNum: number, pageSize: number): Promise<unknown> => {
const _chainId = await storage.getItem(cache_chain_id);
const _chainId = await getNetWorkChainId();
let result = await axios.post(nulink_agent_config.backend_address + '/apply/list', {
proposer_id: proposerId, status: status, paginate: {page: pageNum, page_size: pageSize}, chain_id: _chainId
})
return result.data
}

export const getIncomingApplyFiles = async (fileOwnerId: string, status:number = 0, pageNum: number, pageSize: number): Promise<unknown> => {
const _chainId = await storage.getItem(cache_chain_id);
const _chainId = await getNetWorkChainId();
let result = await axios.post(nulink_agent_config.backend_address + '/apply/list', {
file_owner_id: fileOwnerId, status: status, paginate: {page: pageNum, page_size: pageSize}, chain_id: _chainId
})
Expand Down

0 comments on commit afec428

Please sign in to comment.