Warn on deprecated INFURA API Token; use Project ID instead (#462).

This commit is contained in:
Richard Moore 2019-05-24 14:56:47 -04:00
parent 4a9373e773
commit 19587eea3f
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295

@ -53,6 +53,7 @@ export class InfuraProvider extends JsonRpcProvider {
// Legacy API Access Token
} else {
errors.warn("The legacy INFURA apiAccesToken API is deprecated; please upgrade to a Project ID instead (see INFURA dshboard; https://infura.io)");
super('https://' + host + '/' + projectId, standard);
defineReadOnly(this, 'apiAccessToken', projectId);
defineReadOnly(this, 'projectId', null);