MCPcopy Create free account
hub / github.com/dawsbot/drain / toggleAll

Function toggleAll

components/contract/GetTokens.tsx:185–195  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

183 const allChecked = tokens.length > 0 && checkedCount === tokens.length;
184
185 const toggleAll = () => {
186 if (allChecked) {
187 setCheckedRecords({});
188 } else {
189 setCheckedRecords(
190 Object.fromEntries(
191 tokens.map((t) => [t.contract_address, { isChecked: true }]),
192 ),
193 );
194 }
195 };
196
197 if (loading) {
198 return (

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected