@ape.swap/bonds-sdk 1.0.590 → 1.0.592
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -75,7 +75,7 @@ var BondModal = function (_a) {
|
|
|
75
75
|
billAddress = bondData[0].billAddress;
|
|
76
76
|
decimals = 18;
|
|
77
77
|
try {
|
|
78
|
-
console.log('HANDLEBUY CLICKED');
|
|
78
|
+
console.log('HANDLEBUY CLICKED!');
|
|
79
79
|
maxPrice = new BigNumber(bondData[0].trueBillPrice).times(102).div(100);
|
|
80
80
|
amount = convertToTokenValue(inputValue, decimals);
|
|
81
81
|
console.log('BillAddress:', billAddress);
|
|
@@ -85,7 +85,7 @@ var BondModal = function (_a) {
|
|
|
85
85
|
address: billAddress,
|
|
86
86
|
abi: BOND_ABI,
|
|
87
87
|
functionName: 'deposit',
|
|
88
|
-
args: [amount,
|
|
88
|
+
args: [amount, amount, account],
|
|
89
89
|
});
|
|
90
90
|
console.log('BuyTransaction:', hash);
|
|
91
91
|
if (hash) {
|
|
@@ -85,11 +85,11 @@ var YourBondsModal = function (_a) {
|
|
|
85
85
|
var _u = useState(null), claimTx = _u[0], setClaimTx = _u[1];
|
|
86
86
|
var _v = useState(null), toastMessage = _v[0], setToastMessage = _v[1];
|
|
87
87
|
useEffect(function () {
|
|
88
|
-
if (
|
|
89
|
-
setToastMessage("Transaction complete: ".concat(
|
|
88
|
+
if (claimTx) {
|
|
89
|
+
setToastMessage("Transaction complete: ".concat(claimTx));
|
|
90
90
|
setTimeout(function () { return setToastMessage(null); }, 5000); // Hide toast after 5 seconds
|
|
91
91
|
}
|
|
92
|
-
}, [
|
|
92
|
+
}, [claimTx]);
|
|
93
93
|
// Fetch data for user owned bill
|
|
94
94
|
var _w = useState([]), bondData = _w[0], setBondData = _w[1];
|
|
95
95
|
var _x = useState([]), userOwnedBillsData = _x[0], setUserOwnedBillsData = _x[1];
|