Skip to content

Commit

Permalink
Merge pull request stakwork#573 from stakwork/feat/v2_payments_integr…
Browse files Browse the repository at this point in the history
…ation

PR: added v2 integration
  • Loading branch information
elraphty authored Aug 29, 2024
2 parents 7f9040a + 6c114e7 commit fc27304
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/prjob_cypress_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
timeout_minutes: 10
max_attempts: 3
command: |
GITACTION_ENV=gitactionenv docker-compose -f ./stack/alts/proxy.yml --project-dir ./stack up -d;
GITACTION_ENV=gitactionenv docker compose -f ./stack/alts/proxy.yml --project-directory ./stack up -d;
sleep 240;
docker ps
docker logs meme.sphinx
Expand Down Expand Up @@ -79,4 +79,4 @@ jobs:

- name: Stop Stack
working-directory: ./stack
run: docker-compose down
run: docker compose down
8 changes: 7 additions & 1 deletion src/people/widgetViews/summaries/wantedSummaries/Invoice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,14 @@ export default function Invoice(props: {
qrSize?: number;
}) {
const decoded = lighningDecoder.decode(props.lnInvoice);
const expiry = decoded.sections[8].value;

let expiry = decoded.sections[8].value;
// if it's not v1, do v2
if (isNaN(expiry)) {
expiry = decoded.sections[10].value;
}
const timeCreated = decoded.sections[4].value;

// eslint-disable-next-line react-hooks/exhaustive-deps
const endTime = new Date((timeCreated + expiry) * 1000);
const [timeLeft, setTimeLeft] = useState(calculateTimeLeft(endTime, 'hours'));
Expand Down

0 comments on commit fc27304

Please sign in to comment.