Skip to content

Commit 7d32c51

Browse files
committed
wip
1 parent dd92787 commit 7d32c51

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

react/lib/components/PayButton/PayButton.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,13 @@ export const PayButton = (props: PayButtonProps): React.ReactElement => {
138138
onOpen(amount, to, paymentId)
139139
}
140140
}
141+
console.log('VAI ABRIR O CARALHO MLK 3')
141142
setDialogOpen(true);
142143
}, [cryptoAmount, to, paymentId, price])
143144

144145
const handleCloseDialog = (success?: boolean, paymentId?: string): void => {
145146
if (onClose !== undefined) onClose(success, paymentId);
147+
console.log('VAI ABRIR O CARALHO MLK 4')
146148
setDialogOpen(false);
147149
};
148150

react/lib/components/PaymentDialog/PaymentDialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export const PaymentDialog = (
134134
};
135135
const handleSuccess = (transaction: Transaction): void => {
136136
if (dialogOpen === false) {
137+
console.log('VAI ABRIR O CARALHO MLK 2')
137138
setDialogOpen(true)
138139
}
139140
setSuccess(true);

react/lib/util/socket.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const txsListener = (txsSocket: Socket, setNewTxs: Function, setDialogOpen?: Fun
2929
checkSuccessInfo.expectedOpReturn,
3030
checkSuccessInfo.currencyObj
3131
)) {
32+
console.log('VAI ABRIR O CARALHO MLK 1')
3233
setDialogOpen(true)
3334
setTimeout(() => {
3435
setNewTxs(unconfirmedTxs);

react/lib/util/validate.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export const shouldTriggerOnSuccess = (
1919
paymentId,
2020
rawMessage:rawOpReturn,
2121
message,
22-
amount,
23-
address } = transaction;
24-
22+
amount,
23+
address } = transaction;
24+
2525
const addressPrefix = getAddressPrefix(address);
2626
const isBCH = addressPrefix === 'bitcoincash';
2727
let isAmountValid = true;
@@ -48,17 +48,18 @@ export const shouldTriggerOnSuccess = (
4848
if(!randomSatoshis || randomSatoshis === 0){
4949
if(!isBCH){
5050
const paymentIdsMatch = expectedPaymentId === paymentId;
51-
isPaymentIdValid = disablePaymentId ? true : paymentIdsMatch;
51+
isPaymentIdValid = disablePaymentId ? true : paymentIdsMatch;
5252
}
5353
}
5454
if(!isBCH){
5555
const rawOpReturnIsEmptyOrUndefined = rawOpReturn === '' || rawOpReturn === undefined;
5656
const opReturn = rawOpReturnIsEmptyOrUndefined ? message : rawOpReturn
5757
const opReturnIsEmptyOrUndefined = opReturn === '' || opReturn === undefined;
58-
58+
5959
const opReturnsMatch = opReturn === expectedOpReturn;
6060
isOpReturnValid = expectedOpReturn ? opReturnsMatch : opReturnIsEmptyOrUndefined;
6161
}
6262

63+
console.log('shouldas vai retar', isAmountValid && isPaymentIdValid && isOpReturnValid);
6364
return isAmountValid && isPaymentIdValid && isOpReturnValid;
6465
};

0 commit comments

Comments
 (0)