@sats-connect/core 0.0.10-480061b → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +6 -24
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -730,14 +730,14 @@ declare abstract class SatsConnectAdapter {
|
|
|
730
730
|
private getOrder;
|
|
731
731
|
private estimateRbfOrder;
|
|
732
732
|
private rbfOrder;
|
|
733
|
-
request<Method extends keyof Requests>(method: Method, params: Params<Method>): Promise<RpcResult<Method
|
|
734
|
-
protected abstract requestInternal<Method extends keyof Requests>(method: Method, params: Params<Method>): Promise<RpcResult<Method
|
|
733
|
+
request<Method extends keyof Requests>(method: Method, params: Params<Method>): Promise<RpcResult<Method>>;
|
|
734
|
+
protected abstract requestInternal<Method extends keyof Requests>(method: Method, params: Params<Method>): Promise<RpcResult<Method>>;
|
|
735
735
|
}
|
|
736
736
|
|
|
737
737
|
declare class BaseAdapter extends SatsConnectAdapter {
|
|
738
738
|
id: string;
|
|
739
739
|
constructor(providerId: string);
|
|
740
|
-
requestInternal: <Method extends keyof BtcRequests | keyof StxRequests | keyof RunesRequests>(method: Method, params: Params<Method>) => Promise<RpcResult<Method
|
|
740
|
+
requestInternal: <Method extends keyof BtcRequests | keyof StxRequests | keyof RunesRequests>(method: Method, params: Params<Method>) => Promise<RpcResult<Method>>;
|
|
741
741
|
}
|
|
742
742
|
|
|
743
743
|
declare const DefaultAdaptersInfo: Record<string, Provider>;
|
package/dist/index.mjs
CHANGED
|
@@ -186,14 +186,8 @@ var SatsConnectAdapter = class {
|
|
|
186
186
|
}
|
|
187
187
|
]
|
|
188
188
|
});
|
|
189
|
-
if (paymentResponse
|
|
190
|
-
return
|
|
191
|
-
status: "error",
|
|
192
|
-
error: {
|
|
193
|
-
code: -32e3 /* USER_REJECTION */,
|
|
194
|
-
message: "User rejected the payment request"
|
|
195
|
-
}
|
|
196
|
-
};
|
|
189
|
+
if (paymentResponse.status !== "success") {
|
|
190
|
+
return paymentResponse;
|
|
197
191
|
}
|
|
198
192
|
await new RunesApi(params.network).executeMint(
|
|
199
193
|
orderResponse.data.orderId,
|
|
@@ -252,14 +246,8 @@ var SatsConnectAdapter = class {
|
|
|
252
246
|
}
|
|
253
247
|
]
|
|
254
248
|
});
|
|
255
|
-
if (paymentResponse
|
|
256
|
-
return
|
|
257
|
-
status: "error",
|
|
258
|
-
error: {
|
|
259
|
-
code: -32e3 /* USER_REJECTION */,
|
|
260
|
-
message: "User rejected the payment request"
|
|
261
|
-
}
|
|
262
|
-
};
|
|
249
|
+
if (paymentResponse.status !== "success") {
|
|
250
|
+
return paymentResponse;
|
|
263
251
|
}
|
|
264
252
|
await new RunesApi(params.network).executeEtch(
|
|
265
253
|
orderResponse.data.orderId,
|
|
@@ -402,14 +390,8 @@ var SatsConnectAdapter = class {
|
|
|
402
390
|
}
|
|
403
391
|
]
|
|
404
392
|
});
|
|
405
|
-
if (paymentResponse
|
|
406
|
-
return
|
|
407
|
-
status: "error",
|
|
408
|
-
error: {
|
|
409
|
-
code: -32e3 /* USER_REJECTION */,
|
|
410
|
-
message: "User rejected the payment request"
|
|
411
|
-
}
|
|
412
|
-
};
|
|
393
|
+
if (paymentResponse.status !== "success") {
|
|
394
|
+
return paymentResponse;
|
|
413
395
|
}
|
|
414
396
|
return {
|
|
415
397
|
status: "success",
|