From a63d9e4d2d3045b2058317512869a62c2d739bb9 Mon Sep 17 00:00:00 2001 From: dd Date: Mon, 8 Feb 2021 17:11:56 -0500 Subject: [PATCH] changed typeof to instanceof --- src/client.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client.ts b/src/client.ts index ecfd7b8..3e2bd21 100644 --- a/src/client.ts +++ b/src/client.ts @@ -258,7 +258,7 @@ export class MangoClient { // TODO test on mainnet // if Wallet was provided, sign with wallet - if ((typeof payer) === Wallet) { // this doesn't work. Need to copy over from Omega + if (payer instanceof Wallet) { // this doesn't work. Need to copy over from Omega // TODO test with wallet let args = { @@ -314,7 +314,7 @@ export class MangoClient { ] let notifications; - if ((typeof payer) == Wallet) { + if (payer instanceof Wallet) { const functionName = 'InitMarginAccount' notifications = { sendingMessage: `sending ${functionName} instruction...`, @@ -363,7 +363,7 @@ export class MangoClient { const additionalSigners = [] let notifications; - if ((typeof owner) == Wallet) { + if (owner instanceof Wallet) { const functionName = 'Deposit' notifications = { sendingMessage: `sending ${functionName} instruction...`,