Skip to content

Commit

Permalink
Fix payjoin
Browse files Browse the repository at this point in the history
  • Loading branch information
22388o committed Dec 20, 2024
1 parent 548621a commit 23188d3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/payjoin/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Import PayjoinURL from the 'payjoin-react-native' package
import { PayjoinURL, UTXO } from 'payjoin-react-native';
import { PayjoinURL } from 'payjoin-react-native';
import { UTXO } from 'silent-payments';

export const PayJoin = (url: string) => {
// Create a PayjoinURL instance
Expand All @@ -14,7 +15,7 @@ export const sendPSBT = async (psbt: string) => {
// Send the PSBT to the payjoin server
const response = await fetch('https://payjoin.example.com/payjoin', {
method: 'POST',
headers
Headers
});
return response;
}// Reaceive the response from the payjoin server
Expand All @@ -29,5 +30,8 @@ const utxo: UTXO = {
value: 1000000,
script: 'scriptPubKey',
}

// Use the utxo variable
console.log(utxo)
return response;// Export PayJoin and PayjoinURL
export { PayjoinURL };

0 comments on commit 23188d3

Please sign in to comment.