--- tags: rage-report, v3 --- # Rage Notes ## Challenges/Bugs - Still Having problems importing ABIs into the SDK. Likely a config problem or challenges with loading data from one library to another. ![](https://i.imgur.com/HN465cY.png) - How do we dynamically, based on formValues, change which transactions we call. As an example, if we have a form that optionally mints shares and loot, how do we not call loot, if the value for loot requested is left empty. This is an easy problem to solve if we're doing every TX manually, but pretty tough to scale and standardize. - tsconfig.json in ``haus-sdk`` will occaisonally throw TS errors for no reason. Going to the doc page in the editor will cause the error to go away. Sort of annoying. ## Typescript - How in the Holy Fucking Hell do I do something like this with TS ```js const App: FunctionComponent = () => { const { address, connectWallet, provider } = useWallet(); const [proposals, setProposals] = useState(null); useEffect(() => { let unsub = true; fetchDaoProposals({ setter: setProposals, unsub, query: DAO_PROPOSALS, }); return () => { unsub = false; }; }, []); ``` ```js type ReactThunk<T> = { setter: Dispatch<SetStateAction<T>>; unsub: boolean; query: string; }; export const simpleFetch = async <T>({ setter, unsub, query, }: ReactThunk<T>) => { try { const res = await client.query(query).toPromise(); if (res?.data && unsub) { setter(res); } } catch (error) {} }; ``` - ## Todo - Convert all util functions to use named arguments (discuss) ## Notes - the more I have to do this manually, the more I see the value in the gatherArgs system. Thinking that if we work to simplify the API system, continuing down this path is the best option. -