File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " everscale-inpage-provider" ,
3- "version" : " 0.6.1 " ,
3+ "version" : " 0.6.2 " ,
44 "description" : " Web3-like interface to the Everscale blockchain" ,
55 "repository" : " https://github.com/broxus/everscale-inpage-provider" ,
66 "main" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -38,6 +38,14 @@ export function hasEverscaleProvider(): Promise<boolean> {
3838 return ensurePageLoaded . then ( ( ) => window . __hasEverscaleProvider === true ) ;
3939}
4040
41+ /**
42+ * @category Provider
43+ */
44+ export function hasSparxProvider ( ) : Promise < boolean > {
45+ if ( ! isBrowser ) return Promise . resolve ( false ) ;
46+ return ensurePageLoaded . then ( ( ) => ! ! window . __sparx ) ;
47+ }
48+
4149/**
4250 * A static implementation of the `ProviderAdapter` interface that wraps a given provider instance or a promise that resolves to a provider.
4351 * This adapter always indicates the presence of a provider.
@@ -110,7 +118,7 @@ export class SparxProviderAdapter implements ProviderAdapter {
110118 }
111119
112120 public hasProvider ( ) : Promise < boolean > {
113- return hasEverscaleProvider ( ) ;
121+ return hasSparxProvider ( ) ;
114122 }
115123}
116124
You can’t perform that action at this time.
0 commit comments