File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
packages/lib/src/usecases Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,10 @@ const upsertProviderPool = (
5050) : AccountPoolState => {
5151 const existing = state . pools . findIndex ( ( p ) => p . provider === pool . provider )
5252 const nextPools = [ ...state . pools ]
53- if ( existing >= 0 ) {
54- nextPools [ existing ] = pool
55- } else {
53+ if ( existing === - 1 ) {
5654 nextPools . push ( pool )
55+ } else {
56+ nextPools [ existing ] = pool
5757 }
5858 return { pools : nextPools , updatedAt : now }
5959}
@@ -262,8 +262,7 @@ export const advanceActiveIndex = (
262262export const listAccounts = (
263263 state : AccountPoolState ,
264264 provider : AccountPoolProvider
265- ) : ReadonlyArray < AccountEntry > =>
266- findProviderPool ( state , provider ) . accounts
265+ ) : ReadonlyArray < AccountEntry > => findProviderPool ( state , provider ) . accounts
267266
268267/**
269268 * List all accounts across all providers.
@@ -273,8 +272,7 @@ export const listAccounts = (
273272 */
274273export const listAllAccounts = (
275274 state : AccountPoolState
276- ) : ReadonlyArray < AccountEntry > =>
277- state . pools . flatMap ( ( pool ) => pool . accounts )
275+ ) : ReadonlyArray < AccountEntry > => state . pools . flatMap ( ( pool ) => pool . accounts )
278276
279277/**
280278 * Get pool summary for a provider.
You can’t perform that action at this time.
0 commit comments