Only memomize via instanceId (#2572)

* Add memoizee instanceId

* Gotcha.

* linitng
This commit is contained in:
Jaco Greeff
2020-09-02 17:13:38 +02:00
committed by GitHub
parent e13514cd94
commit b6d1be6ee5
83 changed files with 244 additions and 246 deletions
+2 -2
View File
@@ -45,8 +45,8 @@ function queryConstants (api: ApiInterfaceRx): Observable<ResultV2> {
* });
* ```
*/
export function fees (api: ApiInterfaceRx): () => Observable<DeriveContractFees> {
return memo((): Observable<DeriveContractFees> => {
export function fees (instanceId: string, api: ApiInterfaceRx): () => Observable<DeriveContractFees> {
return memo(instanceId, (): Observable<DeriveContractFees> => {
return queryConstants(api).pipe(
map(([callBaseFee, contractFee, creationFee, transactionBaseFee, transactionByteFee, transferFee, rentByteFee, rentDepositOffset, surchargeReward, tombstoneDeposit]): DeriveContractFees => ({
callBaseFee,