Skip to content

Commit

Permalink
update the paypoint query to contract adjustments needed for wert
Browse files Browse the repository at this point in the history
  • Loading branch information
RKlompUU committed Jun 14, 2022
1 parent efa8c32 commit 95fc910
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/data_access.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const CANCEL_PAYMENT_SQL = "UPDATE tezpay.payments SET is_cancelled = TRUE WHERE
const GET_PAYMENT_SQL = "SELECT * FROM tezpay.payments WHERE external_id = $1";

export default function({db, paypoint_schema_name}) {
let GET_FULFILLMENTS_SQL = `SELECT tx_contexts.level, txs.operation_hash, txs.amount, entries.string as message FROM ${paypoint_schema_name}."entry.default" as entries INNER JOIN que_pasa.tx_contexts as tx_contexts ON tx_contexts.id = entries.tx_context_id INNER JOIN que_pasa.txs as txs ON txs.tx_context_id = entries.tx_context_id WHERE entries.string = $1 AND tx_contexts.level < (SELECT max(level) FROM que_pasa.levels) - $2`;
let GET_FULFILLMENTS_SQL = `SELECT tx_contexts.level, txs.operation_hash, txs.amount, entries.string as message FROM ${paypoint_schema_name}."entry.pay" as entries INNER JOIN que_pasa.tx_contexts as tx_contexts ON tx_contexts.id = entries.tx_context_id INNER JOIN que_pasa.txs as txs ON txs.tx_context_id = entries.tx_context_id WHERE entries.string = $1 AND tx_contexts.level < (SELECT max(level) FROM que_pasa.levels) - $2`;

const get_paypoint_address = async function() {
let result = await db.query(GET_CONTRACT_ADDRESS, [paypoint_schema_name]);
Expand Down

0 comments on commit 95fc910

Please sign in to comment.