Skip to content

Commit

Permalink
fix: getting provider addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
aaitor committed Aug 6, 2024
1 parent aae5c67 commit bfafe72
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/nevermined/NvmApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ export class NvmApp {
)
}

public getProviderAddresses(): string[] {
return this.assetProviders
.filter((provider) => isValidAddress(provider.address))
.map((provider) => provider.address)
}

/**
* Creates a time-based subscription for a given asset.
*
Expand Down Expand Up @@ -352,7 +358,7 @@ export class NvmApp {
},
},
],
providers: this.assetProviders.map((provider) => provider.address),
providers: this.getProviderAddresses(),
nftContractAddress: this.subscriptionNFTContractTimeAddress,
preMint: false,
})
Expand Down Expand Up @@ -418,7 +424,7 @@ export class NvmApp {
},
},
],
providers: this.assetProviders.map((provider) => provider.address),
providers: this.getProviderAddresses(),
nftContractAddress: this.subscriptionNFTContractCreditsAddress,
preMint: false,
})
Expand Down Expand Up @@ -742,7 +748,7 @@ export class NvmApp {
},
},
],
providers: this.assetProviders.map((provider) => provider.address),
providers: this.getProviderAddresses(),
nftContractAddress,
preMint: false,
})
Expand Down Expand Up @@ -808,7 +814,7 @@ export class NvmApp {
},
},
],
providers: this.assetProviders.map((provider) => provider.address),
providers: this.getProviderAddresses(),
nftContractAddress,
preMint: false,
})
Expand Down

0 comments on commit bfafe72

Please sign in to comment.