Skip to content

Commit 2be3e18

Browse files
committed
fix: Various performance fixes
- Prevent duplicate RPC calls caused by not unloading card popover correctly - Reconfigure ethers FallbackProvider to improve response time
1 parent ffcdd2c commit 2be3e18

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

javascript/engine-js/src/wallet/EthersAdapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,13 +331,13 @@ export class EthersAdapter implements IWalletAdapter {
331331
rpcUrls.map((url, index) => {
332332
return {
333333
provider: new ethers.JsonRpcProvider(url, chain, { staticNetwork: new Network(chain.toString(), chain) }),
334-
stallTimeout: 1500,
334+
stallTimeout: 3000,
335335
priority: index + 1,
336336
}
337337
}),
338338
chain,
339339
{
340-
quorum: 2
340+
quorum: 1
341341
}
342342
);
343343
} else {

javascript/tokenscript-viewer/src/components/common/card-view/card-popover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export class CardPopover implements IViewBinding {
191191
history.replaceState(undefined, undefined, "#" + currentParams.toString());
192192
}
193193

194-
await this.dialog.openDialog(() => this.unloadTokenView());
194+
await this.dialog.openDialog(() => this.tokenScript.getViewController().unloadTokenCard());
195195
}
196196

197197
async unloadTokenView() {

javascript/tokenscript-viewer/src/components/viewers/tabbed/viewBinding.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export class ViewBinding extends AbstractViewBinding {
3939

4040
async unloadTokenView(){
4141
(this.view as HTMLDivElement).style.display = "none";
42-
await super.unloadTokenView();
4342
}
4443

4544
async renderAttributesTable(){

0 commit comments

Comments
 (0)