consthasMatchingProvider: boolean = provider.isConnectedToAtLeast(VERSION); if (!hasMatchingProvider) { console.warn('Connected to an older provider version. Some functionality may not be available.'); }
Note: Version information is only available when the connected provider is verison 0.11.2 or later. For earlier
versions, this API will indicate that the provider is disconnected.
Since
0.11.2
Parameters
version: string
Version to compare against the Provider version. This should be in semvar format.
Evaluates the provided version against the Providers version.
This will return
true
if the Provider version is greater than or equal to the provided version. If not,false
will be returned.If the Provider is not connected,
false
will be returned.Note: Version information is only available when the connected provider is verison 0.11.2 or later. For earlier versions, this API will indicate that the provider is disconnected.
Since
0.11.2