-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e825285
commit 4e0909b
Showing
6 changed files
with
90 additions
and
16 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
REPO_ROOT=$(git rev-parse --show-toplevel) | ||
|
||
source ${REPO_ROOT}/dev/vendor/galoy-quickstart/bin/helpers.sh | ||
source ${REPO_ROOT}/dev/vendor/galoy-quickstart/dev/helpers/cli.sh | ||
|
||
function performTransactions { | ||
address="$(lnd_cli newaddress p2wkh | jq -r '.address')" | ||
bitcoin_cli sendtoaddress "$address" 0.1 | ||
bitcoin_cli -generate 3 | ||
|
||
address="$(lnd_outside_cli newaddress p2wkh | jq -r '.address')" | ||
bitcoin_cli sendtoaddress "$address" 0.1 | ||
bitcoin_cli -generate 3 | ||
|
||
btc_amount=100000 | ||
invoice_response="$(lnd_cli addinvoice --amt $btc_amount)" | ||
payment_request="$(echo $invoice_response | jq -r '.payment_request')" | ||
lnd_outside_cli payinvoice -f --pay_req "$payment_request" | ||
local result1=$? | ||
|
||
btc_amount=20000 | ||
invoice_response="$(lnd_outside_cli addinvoice --amt $btc_amount)" | ||
payment_request="$(echo $invoice_response | jq -r '.payment_request')" | ||
lnd_cli payinvoice -f --pay_req "$payment_request" | ||
local result2=$? | ||
|
||
return $(($result1 + $result2)) | ||
} | ||
|
||
until performTransactions; do | ||
echo "One or more transactions failed. Retrying in 5 seconds..." | ||
sleep 5 | ||
done | ||
|
||
echo "lnd <--> lnd-outside channel created with funds" |
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
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 "detox" | ||
|
||
import { i18nObject } from "../../app/i18n/i18n-util" | ||
import { loadLocale } from "../../app/i18n/i18n-util.sync" | ||
import { | ||
getExternalLNNoAmountInvoice, | ||
getLnInvoiceForBob, | ||
getOnchainAddress, | ||
} from "./utils/commandline" | ||
import { setLocalAndLoginWithAccessToken, waitForHomeScreen } from "./utils/common-flows" | ||
import { timeout, BOB_USERNAME, ALICE_TOKEN } from "./utils/config" | ||
Check failure on line 11 in e2e/detox/04-payment-receive.test.ts
|
||
import { addAmount, tap, verifyTextPresent, sleep, slideSlider } from "./utils/controls" | ||
Check failure on line 12 in e2e/detox/04-payment-receive.test.ts
|
||
|
||
loadLocale("en") | ||
const LL = i18nObject("en") | ||
|
||
// Make sure all tests in this file reset back to home screen because tests reuse same session in this file | ||
beforeAll(async () => { | ||
await device.launchApp({ newInstance: true }) | ||
await setLocalAndLoginWithAccessToken(ALICE_TOKEN, LL) | ||
}) | ||
|
||
// Only for the LN tests do we send funds from bob's account for alice to receive | ||
describe("Receive: LN BTC Amountless", () => {}) | ||
describe("Receive: LN BTC $0.02 Amount", () => {}) | ||
describe("Receive: LN Stablesats Amountless", () => {}) | ||
describe("Receive: LN Stablesats $0.02 Amount", () => {}) | ||
|
||
describe("Receive: Onchain BTC", () => {}) | ||
describe("Receive: Onchain Stablesats", () => {}) | ||
|
||
describe("Receive: Paycode", () => {}) |