Skip to content

Commit 27f9ac7

Browse files
committed
Final swaps
1 parent eb1b304 commit 27f9ac7

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/app/swap/liquid.ts

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,29 @@ export interface SwapLiquidInterface {
77
}
88

99
const swapLiquid: SwapLiquidInterface = {
10-
swap: ()
11-
.then(() => {
10+
swap: () => {
11+
return new Promise((resolve, reject) => {
12+
// Perform swap operation here
13+
// For example: breezSwapLiquid.performSwap()
14+
// If successful, call resolve()
15+
// If error occurs, call reject(error)
16+
})
17+
.then(() => {
1218
console.log("Swap successful");
1319
})
14-
.catch((error) => {
20+
.catch((error: any) => {
1521
console.error("Swap error:", error);
16-
}),
17-
swapLiquid: breezSwapLiquid,
22+
});
23+
},
24+
swapLiquid: BreezSwapLiquid,
1825
};
1926

20-
const RefundableSwap = {
27+
export const RefundableSwap = {
2128
swapLiquid,
2229
};
23-
2430
// Initialize the SDK instance
2531
breezSwapLiquid.init({
26-
apiKey: "YOUR_API_KEY",
32+
apiKey.env: "YOUR_API_KEY",
2733
apiUrl: "https://api.breez.technology/v1",
2834
websocketUrl: "wss://api.breez.technology/v1",
2935
network: "liquid",

0 commit comments

Comments
 (0)