Skip to content

Commit a740e68

Browse files
committed
fix: getBalance and related fix
1 parent a3715fd commit a740e68

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/sdk/src/mintlayer-connect-sdk.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ class Client {
848848
const address = this.connectedAddresses;
849849
const currentAddress = address[this.network];
850850

851-
if (this.connectedAddresses[this.network].receiving.length > 0) {
851+
if (this.connectedAddresses[this.network].receiving.length === 0) {
852852
throw new Error('No addresses connected. Call connect first.');
853853
}
854854
try {
@@ -885,7 +885,7 @@ class Client {
885885
const address = this.connectedAddresses;
886886
const currentAddress = address[this.network];
887887

888-
if (this.connectedAddresses[this.network].receiving.length > 0) {
888+
if (this.connectedAddresses[this.network].receiving.length === 0) {
889889
throw new Error('No addresses connected. Call connect first.');
890890
}
891891

@@ -940,7 +940,7 @@ class Client {
940940

941941
async getDelegations(): Promise<any[]> {
942942
this.ensureInitialized();
943-
if (this.connectedAddresses[this.network].receiving.length > 0) {
943+
if (this.connectedAddresses[this.network].receiving.length === 0) {
944944
throw new Error('No addresses connected. Call connect first.');
945945
}
946946
const address = this.connectedAddresses;
@@ -973,7 +973,7 @@ class Client {
973973

974974
async getTokensOwned(): Promise<any[]> {
975975
this.ensureInitialized();
976-
if (this.connectedAddresses[this.network].receiving.length > 0) {
976+
if (this.connectedAddresses[this.network].receiving.length === 0) {
977977
throw new Error('No addresses connected. Call connect first.');
978978
}
979979
const address = this.connectedAddresses;

0 commit comments

Comments
 (0)