Skip to content

Commit

Permalink
Merge pull request #28 from secretkeylabs/follow-up/mahmoud/eng-4240-…
Browse files Browse the repository at this point in the history
…runes-api-mint-5-runes_mint-pops-a-dedicated-runes-mint-tx

follow-up/mahmoud/eng-4240-runes-api-mint-5-runes_mint-pops-a-dedicated-runes-mint-tx
  • Loading branch information
m-aboelenein authored Jul 4, 2024
2 parents 427a08b + a600207 commit 1a36a31
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sats-connect/core",
"version": "0.0.14",
"version": "0.0.15",
"main": "dist/index.mjs",
"module": "dist/index.mjs",
"types": "dist/index.d.mts",
Expand Down
20 changes: 18 additions & 2 deletions src/adapters/satsConnectAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ abstract class SatsConnectAdapter {
if (isMintSupported) {
const response = await this.requestInternal('runes_mint', params);
if (response) {
return response;
if (response.status === 'success') {
return response;
}
if (
response.status === 'error' &&
response.error.code !== RpcErrorCode.METHOD_NOT_FOUND
) {
return response;
}
}
}
}
Expand Down Expand Up @@ -96,7 +104,15 @@ abstract class SatsConnectAdapter {
if (isEtchSupported) {
const response = await this.requestInternal('runes_etch', params);
if (response) {
return response;
if (response.status === 'success') {
return response;
}
if (
response.status === 'error' &&
response.error.code !== RpcErrorCode.METHOD_NOT_FOUND
) {
return response;
}
}
}
}
Expand Down

0 comments on commit 1a36a31

Please sign in to comment.