Skip to content

Commit

Permalink
fix mobile errors (#119)
Browse files Browse the repository at this point in the history
* fix errors

* set polling info already at tracing level
  • Loading branch information
0xNe0x1 authored Jun 17, 2024
1 parent a3aba29 commit ffc07d1
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 29 deletions.
2 changes: 1 addition & 1 deletion dist/esm/index.bundle.js

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -27666,8 +27666,10 @@ var Footer = (function () {
}
}, [confirmationsPassed]);

var trackingInfo = function trackingInfo() {
if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
var trackingInfo = function trackingInfo(transaction) {
if (!transaction) {
return null;
} else if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
return null;
} else if (asynchronousTracking && trackingInitialized == false) {
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
Expand Down Expand Up @@ -27777,7 +27779,7 @@ var Footer = (function () {
className: "CardBodyWrapper"
}, /*#__PURE__*/React.createElement("div", {
className: "Opacity05"
}, "Transaction confirmed"))))), trackingInfo());
}, "Transaction confirmed"))))), trackingInfo(transaction));
}
};

Expand Down Expand Up @@ -28974,6 +28976,9 @@ var PaymentTrackingProvider = (function (props) {
return Promise.resolve();
}

setDeadline(deadline);
setAfterBlock(afterBlock);
setPaymentRoute(paymentRoute);
openSocket(transaction);
return new Promise( /*#__PURE__*/function () {
var _ref6 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee6(resolve, reject) {
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.evm.js.map

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27629,8 +27629,10 @@ var Footer = (function () {
}
}, [confirmationsPassed]);

var trackingInfo = function trackingInfo() {
if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
var trackingInfo = function trackingInfo(transaction) {
if (!transaction) {
return null;
} else if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
return null;
} else if (asynchronousTracking && trackingInitialized == false) {
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
Expand Down Expand Up @@ -27740,7 +27742,7 @@ var Footer = (function () {
className: "CardBodyWrapper"
}, /*#__PURE__*/React.createElement("div", {
className: "Opacity05"
}, "Transaction confirmed"))))), trackingInfo());
}, "Transaction confirmed"))))), trackingInfo(transaction));
}
};

Expand Down Expand Up @@ -28987,6 +28989,9 @@ var PaymentTrackingProvider = (function (props) {
return Promise.resolve();
}

setDeadline(deadline);
setAfterBlock(afterBlock);
setPaymentRoute(paymentRoute);
openSocket(transaction);
return new Promise( /*#__PURE__*/function () {
var _ref6 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee6(resolve, reject) {
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.js.map

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions dist/esm/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -27667,8 +27667,10 @@ var Footer = (function () {
}
}, [confirmationsPassed]);

var trackingInfo = function trackingInfo() {
if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
var trackingInfo = function trackingInfo(transaction) {
if (!transaction) {
return null;
} else if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
return null;
} else if (asynchronousTracking && trackingInitialized == false) {
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
Expand Down Expand Up @@ -27778,7 +27780,7 @@ var Footer = (function () {
className: "CardBodyWrapper"
}, /*#__PURE__*/React.createElement("div", {
className: "Opacity05"
}, "Transaction confirmed"))))), trackingInfo());
}, "Transaction confirmed"))))), trackingInfo(transaction));
}
};

Expand Down Expand Up @@ -29025,6 +29027,9 @@ var PaymentTrackingProvider = (function (props) {
return Promise.resolve();
}

setDeadline(deadline);
setAfterBlock(afterBlock);
setPaymentRoute(paymentRoute);
openSocket(transaction);
return new Promise( /*#__PURE__*/function () {
var _ref6 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee6(resolve, reject) {
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.solana.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/umd/index.bundle.js

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions dist/umd/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -27664,8 +27664,10 @@
}
}, [confirmationsPassed]);

var trackingInfo = function trackingInfo() {
if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
var trackingInfo = function trackingInfo(transaction) {
if (!transaction) {
return null;
} else if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
return null;
} else if (asynchronousTracking && trackingInitialized == false) {
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
Expand Down Expand Up @@ -27775,7 +27777,7 @@
className: "CardBodyWrapper"
}, /*#__PURE__*/React__default['default'].createElement("div", {
className: "Opacity05"
}, "Transaction confirmed"))))), trackingInfo());
}, "Transaction confirmed"))))), trackingInfo(transaction));
}
};

Expand Down Expand Up @@ -28972,6 +28974,9 @@
return Promise.resolve();
}

setDeadline(deadline);
setAfterBlock(afterBlock);
setPaymentRoute(paymentRoute);
openSocket(transaction);
return new Promise( /*#__PURE__*/function () {
var _ref6 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee6(resolve, reject) {
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/index.evm.js.map

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions dist/umd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27625,8 +27625,10 @@
}
}, [confirmationsPassed]);

var trackingInfo = function trackingInfo() {
if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
var trackingInfo = function trackingInfo(transaction) {
if (!transaction) {
return null;
} else if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
return null;
} else if (asynchronousTracking && trackingInitialized == false) {
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
Expand Down Expand Up @@ -27736,7 +27738,7 @@
className: "CardBodyWrapper"
}, /*#__PURE__*/React__default['default'].createElement("div", {
className: "Opacity05"
}, "Transaction confirmed"))))), trackingInfo());
}, "Transaction confirmed"))))), trackingInfo(transaction));
}
};

Expand Down Expand Up @@ -28983,6 +28985,9 @@
return Promise.resolve();
}

setDeadline(deadline);
setAfterBlock(afterBlock);
setPaymentRoute(paymentRoute);
openSocket(transaction);
return new Promise( /*#__PURE__*/function () {
var _ref6 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee6(resolve, reject) {
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/index.js.map

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions dist/umd/index.solana.js
Original file line number Diff line number Diff line change
Expand Up @@ -27665,8 +27665,10 @@
}
}, [confirmationsPassed]);

var trackingInfo = function trackingInfo() {
if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
var trackingInfo = function trackingInfo(transaction) {
if (!transaction) {
return null;
} else if (synchronousTracking == false && asynchronousTracking == false || asynchronousTracking && trackingInitialized) {
return null;
} else if (asynchronousTracking && trackingInitialized == false) {
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
Expand Down Expand Up @@ -27776,7 +27778,7 @@
className: "CardBodyWrapper"
}, /*#__PURE__*/React__default['default'].createElement("div", {
className: "Opacity05"
}, "Transaction confirmed"))))), trackingInfo());
}, "Transaction confirmed"))))), trackingInfo(transaction));
}
};

Expand Down Expand Up @@ -29023,6 +29025,9 @@
return Promise.resolve();
}

setDeadline(deadline);
setAfterBlock(afterBlock);
setPaymentRoute(paymentRoute);
openSocket(transaction);
return new Promise( /*#__PURE__*/function () {
var _ref6 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee6(resolve, reject) {
Expand Down
2 changes: 1 addition & 1 deletion dist/umd/index.solana.js.map

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ export default ()=>{
}
}, [confirmationsPassed])

const trackingInfo = ()=> {
if((synchronousTracking == false && asynchronousTracking == false) || (asynchronousTracking && trackingInitialized)) {
const trackingInfo = (transaction)=> {
if (!transaction) {
return null
} else if((synchronousTracking == false && asynchronousTracking == false) || (asynchronousTracking && trackingInitialized)) {
return null
} else if (asynchronousTracking && trackingInitialized == false) {
return(
Expand Down Expand Up @@ -154,7 +156,7 @@ export default ()=>{
</div>
</a>
</div>
{ trackingInfo() }
{ trackingInfo(transaction) }
</div>
)
}
Expand Down
3 changes: 3 additions & 0 deletions src/providers/PaymentTrackingProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ export default (props)=>{
const trace = (afterBlock, paymentRoute, transaction, deadline)=>{
setAttemptId() // reset attemptId in case payment is retried
if(!synchronousTracking && !asynchronousTracking) { return Promise.resolve() }
setDeadline(deadline)
setAfterBlock(afterBlock)
setPaymentRoute(paymentRoute)
openSocket(transaction)
return new Promise(async(resolve, reject)=>{
let performedPayment = {
Expand Down

0 comments on commit ffc07d1

Please sign in to comment.