Skip to content

Commit

Permalink
Merge pull request #105 from esolidar/hotfix-ENG-2335
Browse files Browse the repository at this point in the history
Hotfix eng 2335
  • Loading branch information
pedroguia authored Jul 26, 2022
2 parents 379dfc7 + a664dd8 commit 3de831c
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 53 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ All notable changes to this project will be documented in this file.
<br>
<br>

## [v1.0.0](https://github.com/esolidar/web3/compare/v3.8.0...v3.9.0) Released: ER2226 / 01st June 2022 -> 05th July 2022
## [v1.0.1](https://github.com/esolidar/web3/compare/v1.0.0...v1.0.1) Released: 26th July 2022

### Bug Fixing

- NPO wallet with incorrect amount [`ENG-2335`](https://github.com/esolidar/web3/pulls?q=ENG-2335)
<br>
<br>

## [v1.0.0](https://github.com/esolidar/web3/compare/v0.0.0...v1.0.0) Released: ER2226 / 01st June 2022 -> 05th July 2022

### New features

Expand Down
1 change: 1 addition & 0 deletions declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ declare module '@esolidar/toolkit/build/utils/getUrlParam';
declare module '@esolidar/toolkit/build/utils/removeUrlParam';
declare module '@esolidar/toolkit/build/elements/tabs';
declare module '@esolidar/toolkit/build/utils/isDefined';
declare module '@esolidar/toolkit/build/utils/isEmpty';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@esolidar/web3",
"version": "1.0.0",
"version": "1.0.1",
"private": true,
"scripts": {
"dev": "npm run clean &&next dev",
Expand Down
2 changes: 1 addition & 1 deletion public/sw.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/api/hooks/useCeloWalletBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const celoContractAddresses: CeloContractAddress[] = [
{ address: String(process.env.NEXT_PUBLIC_CONTRACT_CEUR_ADDRES), name: 'ceur' },
];

const useCeloWalletBalance = ({ wallet, balanceOf, enabled = true, onSuccess }: Args) =>
const useCeloWalletBalance = ({ wallet, balanceOf, enabled = false, onSuccess }: Args) =>
useQuery(
'celoWalletBalance',
async () => {
Expand Down
16 changes: 3 additions & 13 deletions src/api/hooks/useGetInstitutionDetail.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { QueryClient, useQuery } from 'react-query';
import { useQuery } from 'react-query';
import axios from 'axios';
import ROOT_URL from '../../constants/apiUrl';

Expand All @@ -8,30 +8,20 @@ interface Args {
onSuccess?(data: any): void;
}

const queryKey: string = 'getInstitutionDetail';
const url = (institutionId: string): string => `${ROOT_URL}institutions/${institutionId}/public`;

const useGetInstitutionDetail = ({ institutionId, enabled = true, onSuccess }: Args) =>
useQuery(
queryKey,
'getInstitutionDetail',
async () => {
const { data: response } = await axios.get(url(institutionId));
return response.data;
},
{
onSuccess: data => onSuccess && onSuccess(data),
enabled,
initialData: {},
}
);

export const useGetInstitutionDetailPrefetch = async (
queryClient: QueryClient,
institutionId: string
) => {
await queryClient.prefetchQuery(queryKey, async () => {
const { data: response } = await axios.get(url(institutionId));
return response.data;
});
};

export default useGetInstitutionDetail;
Loading

0 comments on commit 3de831c

Please sign in to comment.