-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #666 from BoltzExchange/bolt12
feat: bolt12 support for submarine swaps
- Loading branch information
Showing
15 changed files
with
506 additions
and
35 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"); | ||
await expect(skipDownload).toBeVisible(); | ||
}); | ||
}); |
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.