Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove array.at usage as not supported in Native #215

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/ordinals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

const ordinalIds = await axios.get<string[]>(ordinalContentUrl);
if (ordinalIds.data.length > 0) {
return ordinalIds.data.at(-1);
return ordinalIds.data[ordinalIds.data.length - 1];
} else {
return null;
}
Expand All @@ -90,8 +90,8 @@
timeout: 30000,
transformResponse: [(data) => parseOrdinalTextContentData(data)],
})
.then((response) => response!.data)

Check warning on line 93 in api/ordinals.ts

View workflow job for this annotation

GitHub Actions / test

Forbidden non-null assertion
.catch((error) => {

Check warning on line 94 in api/ordinals.ts

View workflow job for this annotation

GitHub Actions / test

'error' is defined but never used
return '';
});
}
Expand Down Expand Up @@ -121,9 +121,9 @@
})
.then((response) => {
if (response.data) {
const responseTokensList = response!.data;

Check warning on line 124 in api/ordinals.ts

View workflow job for this annotation

GitHub Actions / test

Forbidden non-null assertion
const tokensList: Array<FungibleToken> = [];
responseTokensList.forEach((responseToken: any) => {

Check warning on line 126 in api/ordinals.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
const token: FungibleToken = {
name: responseToken.ticker,
balance: responseToken.overallBalance,
Expand All @@ -146,7 +146,7 @@
return [];
}
})
.catch((error) => {

Check warning on line 149 in api/ordinals.ts

View workflow job for this annotation

GitHub Actions / test

'error' is defined but never used
return [];
});
}
Expand All @@ -165,7 +165,7 @@
});
return transactions;
})
.catch((error) => {

Check warning on line 168 in api/ordinals.ts

View workflow job for this annotation

GitHub Actions / test

'error' is defined but never used
return [];
});
}
Expand Down
Loading