Skip to content

Commit

Permalink
fix mutating the btc_providers array
Browse files Browse the repository at this point in the history
  • Loading branch information
m-aboelenein committed Apr 16, 2024
1 parent fa023cb commit ef33eb2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ export function removeDefaultProvider() {

export function getSupportedWallets(): SupportedWallet[] {
const btc_providers = getProviders();
const allProviders = [...btc_providers];
for (const key in omit(DefaultAdaptersInfo, ['xverse'])) {
btc_providers.push(DefaultAdaptersInfo[key]);
allProviders.push(DefaultAdaptersInfo[key]);
}
const wallets: SupportedWallet[] = btc_providers.map((provider) => {
const wallets: SupportedWallet[] = allProviders.map((provider) => {
{
return {
...provider,
Expand Down

0 comments on commit ef33eb2

Please sign in to comment.