-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bolt12 support for submarine swaps
- Loading branch information
1 parent
7ed509f
commit 1e4dc33
Showing
13 changed files
with
432 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { expect, test } from "@playwright/test"; | ||
|
||
import { generateBitcoinBlock, getBolt12Offer } from "./utils"; | ||
|
||
test.describe("BOLT12", () => { | ||
test.beforeEach(async () => { | ||
await generateBitcoinBlock(); | ||
}); | ||
|
||
test("Resolve bolt12 offer", async ({ page }) => { | ||
await page.goto("/"); | ||
|
||
const divFlipAssets = page.locator("#flip-assets"); | ||
await divFlipAssets.click(); | ||
|
||
const receiveAmount = "0.01"; | ||
const inputReceiveAmount = page.locator( | ||
"input[data-testid='receiveAmount']", | ||
); | ||
await inputReceiveAmount.fill(receiveAmount); | ||
|
||
const invoiceInput = page.locator("textarea[data-testid='invoice']"); | ||
await invoiceInput.fill(await getBolt12Offer()); | ||
const buttonCreateSwap = page.locator( | ||
"button[data-testid='create-swap-button']", | ||
); | ||
await buttonCreateSwap.click(); | ||
|
||
const skipDownload = page.getByText("Skip download"); | ||
expect(skipDownload).toBeDefined(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.