aboutsummaryrefslogtreecommitdiff
path: root/src/webex
diff options
context:
space:
mode:
Diffstat (limited to 'src/webex')
-rw-r--r--src/webex/messages.ts2
-rw-r--r--src/webex/pages/payback.tsx6
-rw-r--r--src/webex/pages/popup.tsx8
-rw-r--r--src/webex/renderHtml.tsx2
-rw-r--r--src/webex/wxBackend.ts2
5 files changed, 10 insertions, 10 deletions
diff --git a/src/webex/messages.ts b/src/webex/messages.ts
index 3f6e5cc4a..034bf2849 100644
--- a/src/webex/messages.ts
+++ b/src/webex/messages.ts
@@ -79,7 +79,7 @@ export interface MessageMap {
};
"get-history": {
request: {};
- response: walletTypes.HistoryRecord[];
+ response: walletTypes.HistoryEvent[];
};
"get-coins": {
request: { exchangeBaseUrl: string };
diff --git a/src/webex/pages/payback.tsx b/src/webex/pages/payback.tsx
index 934c28c0a..af14b95d4 100644
--- a/src/webex/pages/payback.tsx
+++ b/src/webex/pages/payback.tsx
@@ -57,11 +57,11 @@ function Payback() {
<div>
{reserves.map(r => (
<div>
- <h2>Reserve for ${renderAmount(r.current_amount!)}</h2>
+ <h2>Reserve for ${renderAmount(r.currentAmount!)}</h2>
<ul>
- <li>Exchange: ${r.exchange_base_url}</li>
+ <li>Exchange: ${r.exchangeBaseUrl}</li>
</ul>
- <button onClick={() => withdrawPaybackReserve(r.reserve_pub)}>
+ <button onClick={() => withdrawPaybackReserve(r.reservePub)}>
Withdraw again
</button>
</div>
diff --git a/src/webex/pages/popup.tsx b/src/webex/pages/popup.tsx
index 205945471..78b7374b3 100644
--- a/src/webex/pages/popup.tsx
+++ b/src/webex/pages/popup.tsx
@@ -30,7 +30,7 @@ import { AmountJson } from "../../amounts";
import * as Amounts from "../../amounts";
import {
- HistoryRecord,
+ HistoryEvent,
WalletBalance,
WalletBalanceEntry,
} from "../../walletTypes";
@@ -327,7 +327,7 @@ class WalletBalanceView extends React.Component<any, any> {
}
}
-function formatHistoryItem(historyItem: HistoryRecord) {
+function formatHistoryItem(historyItem: HistoryEvent) {
const d = historyItem.detail;
console.log("hist item", historyItem);
switch (historyItem.type) {
@@ -459,7 +459,7 @@ class WalletHistory extends React.Component<any, any> {
render(): JSX.Element {
console.log("rendering history");
- const history: HistoryRecord[] = this.myHistory;
+ const history: HistoryEvent[] = this.myHistory;
if (this.gotError) {
return i18n.str`Error: could not retrieve event history`;
}
@@ -474,7 +474,7 @@ class WalletHistory extends React.Component<any, any> {
const item = (
<div className="historyItem">
<div className="historyDate">
- {new Date(record.timestamp).toString()}
+ {new Date(record.timestamp.t_ms).toString()}
</div>
{formatHistoryItem(record)}
</div>
diff --git a/src/webex/renderHtml.tsx b/src/webex/renderHtml.tsx
index f2cccfba6..c2fdb1f14 100644
--- a/src/webex/renderHtml.tsx
+++ b/src/webex/renderHtml.tsx
@@ -215,7 +215,7 @@ function FeeDetailsView(props: {
<tbody>
{rci!.wireFees.feesForType[s].map(f => (
<tr>
- <td>{moment.unix(f.endStamp).format("llll")}</td>
+ <td>{moment.unix(Math.floor(f.endStamp.t_ms / 1000)).format("llll")}</td>
<td>{renderAmount(f.wireFee)}</td>
<td>{renderAmount(f.closingFee)}</td>
</tr>
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts
index f4decbc60..57c10d94a 100644
--- a/src/webex/wxBackend.ts
+++ b/src/webex/wxBackend.ts
@@ -176,7 +176,7 @@ async function handleMessage(
if (typeof detail.exchangeBaseUrl !== "string") {
return Promise.reject(Error("exchangBaseUrl missing"));
}
- return needsWallet().getCoins(detail.exchangeBaseUrl);
+ return needsWallet().getCoinsForExchange(detail.exchangeBaseUrl);
}
case "get-precoins": {
if (typeof detail.exchangeBaseUrl !== "string") {