Skip to content

Commit

Permalink
fix axios version and update adapter handler types
Browse files Browse the repository at this point in the history
  • Loading branch information
m-aboelenein committed Apr 5, 2024
1 parent ad96e96 commit 759aae1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 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
Expand Up @@ -24,7 +24,7 @@
]
},
"dependencies": {
"axios": "^1.6.8",
"axios": "1.6.8",
"bitcoin-address-validation": "2.2.3",
"buffer": "6.0.3",
"jsontokens": "4.0.1",
Expand Down
9 changes: 4 additions & 5 deletions src/adapters/satsConnectAdapter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { RunesApi } from '../runes';
import { Params, Requests } from '../request';
import { RpcErrorCode, RpcResult } from '../types';
import { EstimateRunesEtchParams, EstimateRunesMintParams } from '../request/types/runesMethods';

abstract class SatsConnectAdapter {
abstract readonly id: string;
Expand Down Expand Up @@ -122,12 +121,12 @@ abstract class SatsConnectAdapter {
case 'runes_etch':
return this.etchRunes(params as Params<'runes_etch'>) as Promise<RpcResult<Method>>;
case 'runes_estimateMint':
return new RunesApi((params as EstimateRunesMintParams).network).estimateMintCost(
params as EstimateRunesMintParams
return new RunesApi((params as Params<'runes_estimateMint'>).network).estimateMintCost(
params as Params<'runes_estimateMint'>
) as Promise<RpcResult<Method>>;
case 'runes_estimateEtch':
return new RunesApi((params as EstimateRunesMintParams).network).estimateEtchCost(
params as EstimateRunesEtchParams
return new RunesApi((params as Params<'runes_estimateEtch'>).network).estimateEtchCost(
params as Params<'runes_estimateEtch'>
) as Promise<RpcResult<Method>>;
default:
return this.requestInternal(method, params);
Expand Down

0 comments on commit 759aae1

Please sign in to comment.