The useStandardWalletAdapters hook is inefficient, triggering a render from useEffect on the initial render. This causes an app using this to initially render without the wrapped standard wallets, having a tendency to mess with logic that auto-selects a wallet. The filtering of the adapters provided is also inefficient, filtering standard adapters against each other by name, iterating over adapters too many times, and also causing later-registered wallets to end up in the output before first-registered ones. This fixes these things by using refs and memos and splitting the adapters into separate queues.
The
useStandardWalletAdapters
hook is inefficient, triggering a render fromuseEffect
on the initial render. This causes an app using this to initially render without the wrapped standard wallets, having a tendency to mess with logic that auto-selects a wallet. The filtering of the adapters provided is also inefficient, filtering standard adapters against each other by name, iterating over adapters too many times, and also causing later-registered wallets to end up in the output before first-registered ones. This fixes these things by using refs and memos and splitting the adapters into separate queues.