mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #8059 from bitjson/tslint/no-string-throw
lint: reenable tslint no-string-throw, fix issues
This commit is contained in:
commit
aa90b18456
|
@ -32,7 +32,7 @@ export class Profile {
|
|||
x.checkedUA = obj.checkedUA || {};
|
||||
|
||||
if (x.credentials[0] && typeof x.credentials[0] != 'object')
|
||||
throw ("credentials should be an object");
|
||||
throw new Error("credentials should be an object");
|
||||
return x;
|
||||
};
|
||||
|
||||
|
@ -74,7 +74,7 @@ export class Profile {
|
|||
|
||||
public addWallet(credentials: any): boolean {
|
||||
if (!credentials.walletId)
|
||||
throw 'credentials must have .walletId';
|
||||
throw new Error('credentials must have .walletId');
|
||||
|
||||
if (this.hasWallet(credentials.walletId))
|
||||
return false;
|
||||
|
@ -86,7 +86,7 @@ export class Profile {
|
|||
|
||||
public updateWallet(credentials: any): boolean {
|
||||
if (!credentials.walletId)
|
||||
throw 'credentials must have .walletId';
|
||||
throw new Error('credentials must have .walletId');
|
||||
|
||||
if (!this.hasWallet(credentials.walletId))
|
||||
return false;
|
||||
|
|
|
@ -937,7 +937,7 @@ export class ProfileProvider {
|
|||
|
||||
public getWallets(opts?: any) {
|
||||
|
||||
if (opts && !_.isObject(opts)) throw "bad argument";
|
||||
if (opts && !_.isObject(opts)) throw new Error("bad argument");
|
||||
|
||||
opts = opts || {};
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
"curly": false,
|
||||
"object-literal-shorthand": false,
|
||||
"member-access": false,
|
||||
"no-string-throw": false,
|
||||
"arrow-return-shorthand": false,
|
||||
"array-type": false
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue