-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: update solvers * fix: dynamic imports * fix: some lint issues * fix: removing wdyu * fix: remove log * fix: enable * fix: endpoint to path * Feat/wagmi address (#219) * feat: remove all wagmiAddress * fix: linting * fix: typing issues * fix: remove useless assert and add namecheck * fix: remove duplicate import * Update apps/vaults/contexts/useStakingRewards.tsx Co-authored-by: Chef Karelian <78794805+karelianpie@users.noreply.github.com> * Feat/wagmi-bribesfix (#220) * feat: remove v3 declaration * fix: transform strings to addresses * fix: bribe results * fix: revert ui changes. Later * fix: some bit of UI * fix: responsiveness * Update apps/common/schemas/curveSchemas.ts Co-authored-by: Chef Karelian <78794805+karelianpie@users.noreply.github.com> * fix: transform toAddress easy mode * feat/Refactor tx handlers (#222) * feat: wagmi handleTX init * fix: remove some level of complexity * feat: migrate the common actions * feat: suggestion to make bigInt |undefined to be sure to check stuff * fix: remove stupid suggestion * feat: migrate actions * fix: Types * fix: Cannot set bigint to type undefined * Update apps/common/utils/toWagmiProvider.tsx * fix: remove useless toString() (#223) --------- Co-authored-by: Karelian Pie <devkarelianpie@gmail.com> --------- Co-authored-by: Chef Karelian <78794805+karelianpie@users.noreply.github.com> Co-authored-by: Karelian Pie <devkarelianpie@gmail.com> --------- Co-authored-by: Chef Karelian <78794805+karelianpie@users.noreply.github.com> Co-authored-by: Karelian Pie <devkarelianpie@gmail.com> --------- Co-authored-by: Chef Karelian <78794805+karelianpie@users.noreply.github.com> Co-authored-by: Karelian Pie <devkarelianpie@gmail.com>
- Loading branch information
1 parent
172c241
commit 0bacd93
Showing
89 changed files
with
3,058 additions
and
4,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* eslint-disable @typescript-eslint/no-explicit-any */ | ||
import {useEffect, useRef} from 'react'; | ||
|
||
function useWhyDidYouUpdate(name: string, props: any): void { | ||
// Get a mutable ref object where we can store props ... | ||
// ... for comparison next time this hook runs. | ||
const previousProps = useRef<any>(); | ||
|
||
useEffect((): void => { | ||
if (previousProps.current) { | ||
// Get all keys from previous and current props | ||
const allKeys = Object.keys({...previousProps.current, ...props}); | ||
// Use this object to keep track of changed props | ||
const changesObj: any = {}; | ||
// Iterate through keys | ||
allKeys.forEach((key): void => { | ||
// If previous is different from current | ||
if (previousProps.current[key] !== props[key]) { | ||
// Add to changesObj | ||
changesObj[key] = { | ||
from: previousProps.current[key], | ||
to: props[key] | ||
}; | ||
} | ||
}); | ||
|
||
// If changesObj not empty then output to console | ||
if (Object.keys(changesObj).length) { | ||
console.log('[why-did-you-update]', name, changesObj); | ||
} | ||
} | ||
|
||
// Finally update previousProps with current props for next hook call | ||
previousProps.current = props; | ||
}); | ||
} | ||
|
||
export default useWhyDidYouUpdate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import type {TDict} from '@yearn-finance/web-lib/types'; | ||
|
||
export type TCurveGaugeVersionRewards = { | ||
v3: TDict<TDict<bigint>>, | ||
} | ||
export type TCurveGaugeVersionRewards = TDict<TDict<bigint>>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.