Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3647f2ca5 | ||
|
|
4cb454ea39 |
No files matched your search
@@ -1,5 +1,13 @@
|
||||
# Changelog
|
||||
|
||||
## [0.2.3] - 2026-10-27
|
||||
|
||||
- Payments now show under Activity at the bottom of the page, with the day each one arrived and what became of it. The section stays hidden until there is a payment.
|
||||
|
||||
## [0.2.2] - 2026-10-27
|
||||
|
||||
- Sign in once for every waozi.xyz site: a profile signed in on Arcade, Apfelwurm or here is used by the others in the same browser, and logging out on one logs it out of the shared sign-in.
|
||||
|
||||
## [0.2.1] - 2026-10-27
|
||||
|
||||
- The Profile opens even when a saved account key on this browser cannot be read; it says so, keeps the key aside and lets you sign in again.
|
||||
|
||||
+18
-5
@@ -123,11 +123,24 @@
|
||||
onAbort: failed,
|
||||
onExit: function (code) { if (code !== 0) failed(); }
|
||||
};
|
||||
var script = document.createElement('script');
|
||||
script.src = 'runtime.js';
|
||||
script.onerror = failed;
|
||||
document.body.appendChild(script);
|
||||
watch();
|
||||
function start() {
|
||||
var script = document.createElement('script');
|
||||
script.src = 'runtime.js';
|
||||
script.onerror = failed;
|
||||
document.body.appendChild(script);
|
||||
watch();
|
||||
}
|
||||
// One sign-in for every waozi.xyz site: account.waozi.xyz hands over
|
||||
// the shared key before the app starts. It never holds the page up for
|
||||
// long, and the page starts without it if the hub cannot be reached.
|
||||
var started = false;
|
||||
function go() { if (!started) { started = true; start(); } }
|
||||
var shared = document.createElement('script');
|
||||
shared.src = 'https://account.waozi.xyz/share.js';
|
||||
shared.onload = function () { WaoziAccount.attach(Module, 2500).then(go, go); };
|
||||
shared.onerror = go;
|
||||
setTimeout(go, 4000);
|
||||
document.head.appendChild(shared);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
|
||||
+22
-17
@@ -346,23 +346,6 @@ TopupFrame :: (session: Session, viewport: Rectangle, input: TextFieldInput, now
|
||||
topup_card_heights[0] = y - card_y
|
||||
y += 16.0
|
||||
|
||||
// Payments on their way to the signed-in account.
|
||||
if status.ready && status.funded && !guest && topup_deposit_count >= 0 {
|
||||
card_y = y
|
||||
Card(session, 60060, x, y, column, topup_card_heights[1])
|
||||
y += 18.0
|
||||
Line(session, 60061, copy.incoming, x + 18.0, *y, inner, 21, 10.0)
|
||||
if topup_deposit_count == 0 { Line(session, 60062, copy.no_deposits, x + 18.0, *y, inner, 15, 0.0) }
|
||||
for index: 0..topup_deposit_count - 1 {
|
||||
line: [256]u8
|
||||
Line(session, cast(u64)(60063 + index), DepositText(topup_deposits[index], funding.confirmations, line[:]),
|
||||
x + 18.0, *y, inner, 15, 6.0)
|
||||
}
|
||||
y += 18.0
|
||||
topup_card_heights[1] = y - card_y
|
||||
y += 16.0
|
||||
}
|
||||
|
||||
// How much Dew.
|
||||
card_y = y
|
||||
Card(session, 60020, x, y, column, topup_card_heights[2])
|
||||
@@ -454,6 +437,23 @@ TopupFrame :: (session: Session, viewport: Rectangle, input: TextFieldInput, now
|
||||
topup_card_heights[4] = y - card_y
|
||||
y += 24.0
|
||||
|
||||
// Activity: the account's Monero payments, newest first, with the day each
|
||||
// arrived and what became of it. Nothing shows until there is one.
|
||||
if status.ready && status.funded && !guest && topup_deposit_count > 0 {
|
||||
card_y = y
|
||||
Card(session, 60060, x, y, column, topup_card_heights[1])
|
||||
y += 18.0
|
||||
Line(session, 60061, copy.activity, x + 18.0, *y, inner, 21, 10.0)
|
||||
for index: 0..topup_deposit_count - 1 {
|
||||
line: [256]u8
|
||||
Line(session, cast(u64)(60063 + index), DepositText(topup_deposits[index], funding.confirmations, line[:]),
|
||||
x + 18.0, *y, inner, 15, 6.0)
|
||||
}
|
||||
y += 18.0
|
||||
topup_card_heights[1] = y - card_y
|
||||
y += 16.0
|
||||
}
|
||||
|
||||
Line(session, 60050, copy.footer, x, *y, column, 15, 10.0)
|
||||
if Button(session, ButtonProps.{.key = cast(u64)60051, .id = 60051, .label = "waozi.xyz",
|
||||
.bounds = Rectangle.{x, y, 140.0, 40.0}, .tone = ButtonTone.ButtonToneAccent,
|
||||
@@ -602,7 +602,12 @@ DepositText :: (deposit: DewDeposit, required: s64, output: []u8) -> string {
|
||||
xmr: [48]u8
|
||||
first: [24]u8
|
||||
second: [24]u8
|
||||
// "2026-10-27 · 0.05 XMR" when the node gave the day.
|
||||
dated: [80]u8
|
||||
at: s64 = 0
|
||||
amount := XmrText(deposit.atomic, xmr[:])
|
||||
if deposit.day[0] != cast(u8)0 && Append(dated[:], *at, TextUntilNul(deposit.day[:])) && Append(dated[:], *at, " · ") &&
|
||||
Append(dated[:], *at, amount) { amount = TextUntilNul(dated[:]) }
|
||||
state := TextUntilNul(deposit.status[:])
|
||||
if state == "credited" {
|
||||
dew: [48]u8
|
||||
|
||||
+4
-8
@@ -31,8 +31,7 @@ TopupCopy :: struct {
|
||||
copy_address: string
|
||||
copied: string
|
||||
confirmations: string
|
||||
incoming: string
|
||||
no_deposits: string
|
||||
activity: string
|
||||
deposit_confirming: string
|
||||
deposit_confirmed: string
|
||||
deposit_credited: string
|
||||
@@ -80,8 +79,7 @@ TopupEnglish :: () -> TopupCopy {
|
||||
.copy_address = "Copy address",
|
||||
.copied = "Copied",
|
||||
.confirmations = "Dew arrives after %1 confirmations, about %2 minutes after you send.",
|
||||
.incoming = "Incoming payments",
|
||||
.no_deposits = "No payment seen yet. It shows up here as soon as it reaches the network.",
|
||||
.activity = "Activity",
|
||||
.deposit_confirming = "%1 · %2 of %3 confirmations",
|
||||
.deposit_confirmed = "%1 · confirmed, adding Dew…",
|
||||
.deposit_credited = "%1 · %2 Dew added",
|
||||
@@ -129,8 +127,7 @@ TopupGerman :: () -> TopupCopy {
|
||||
.copy_address = "Adresse kopieren",
|
||||
.copied = "Kopiert",
|
||||
.confirmations = "Dew kommt nach %1 Bestätigungen an, etwa %2 Minuten nach dem Senden.",
|
||||
.incoming = "Eingehende Zahlungen",
|
||||
.no_deposits = "Noch keine Zahlung gesehen. Sie erscheint hier, sobald sie im Netzwerk ist.",
|
||||
.activity = "Aktivität",
|
||||
.deposit_confirming = "%1 · %2 von %3 Bestätigungen",
|
||||
.deposit_confirmed = "%1 · bestätigt, Dew wird gutgeschrieben …",
|
||||
.deposit_credited = "%1 · %2 Dew gutgeschrieben",
|
||||
@@ -178,8 +175,7 @@ TopupSpanish :: () -> TopupCopy {
|
||||
.copy_address = "Copiar dirección",
|
||||
.copied = "Copiada",
|
||||
.confirmations = "El Dew llega tras %1 confirmaciones, unos %2 minutos después del envío.",
|
||||
.incoming = "Pagos entrantes",
|
||||
.no_deposits = "Aún no se ha visto ningún pago. Aparecerá aquí en cuanto llegue a la red.",
|
||||
.activity = "Actividad",
|
||||
.deposit_confirming = "%1 · %2 de %3 confirmaciones",
|
||||
.deposit_confirmed = "%1 · confirmado, añadiendo Dew…",
|
||||
.deposit_credited = "%1 · %2 Dew añadidos",
|
||||
|
||||
@@ -240,6 +240,18 @@ DewDeposit :: struct {
|
||||
units: s64
|
||||
confirmations: s64
|
||||
status: [24]u8
|
||||
// The UTC day it was credited, or first seen while still on its way.
|
||||
day: [11]u8
|
||||
}
|
||||
|
||||
// "2026-10-27" at the start of an RFC 3339 time.
|
||||
DayValid :: (stamp: string) -> bool {
|
||||
if stamp.count < 10 || stamp[4] != cast(u8)45 || stamp[7] != cast(u8)45 { return false }
|
||||
for index: 0..9 {
|
||||
if index == 4 || index == 7 { continue }
|
||||
if stamp[index] < cast(u8)48 || stamp[index] > cast(u8)57 { return false }
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// The newest deposits from {"deposits":[…]}, at most output.count; -1 when
|
||||
@@ -257,6 +269,14 @@ DewParseDeposits :: (json: string, output: []DewDeposit) -> s32 {
|
||||
!DewInteger(json, FieldAt(json, at, "confirmations"), *deposit.confirmations) ||
|
||||
ReadStringText(json, FieldAt(json, at, "status"), deposit.status[:]) <= 0 { continue }
|
||||
if !DewInteger(json, FieldAt(json, at, "token_units"), *deposit.units) { deposit.units = 0 }
|
||||
stamp: [40]u8
|
||||
if ReadStringText(json, FieldAt(json, at, "credited_at"), stamp[:]) < 10 {
|
||||
stamp = .{}
|
||||
unused ReadStringText(json, FieldAt(json, at, "first_seen_at"), stamp[:])
|
||||
}
|
||||
if DayValid(TextUntilNul(stamp[:])) {
|
||||
for index: 0..9 { deposit.day[index] = stamp[index] }
|
||||
}
|
||||
output[used] = deposit
|
||||
used += 1
|
||||
}
|
||||
|
||||
@@ -80,6 +80,8 @@ main :: () -> s32 {
|
||||
if DewParseDeposits(list, deposits[:]) != 2 { return 60 }
|
||||
if deposits[0].atomic != 50000000000 || deposits[0].confirmations != 3 || TextUntilNul(deposits[0].status[:]) != "confirming" || deposits[0].units != 0 { return 61 }
|
||||
if deposits[1].units != 100000000 || TextUntilNul(deposits[1].status[:]) != "credited" { return 62 }
|
||||
if TextUntilNul(deposits[0].day[:]) != "2026-10-27" || TextUntilNul(deposits[1].day[:]) != "2026-10-26" { return 64 }
|
||||
if !DayValid("2026-10-27T17:00:00Z") || DayValid("2026/10/27") || DayValid("") { return 65 }
|
||||
if DewParseDeposits("{\"deposits\":[]}", deposits[:]) != 0 || DewParseDeposits("{}", deposits[:]) != -1 || DewParseDeposits("", deposits[:]) != -1 { return 63 }
|
||||
return 0
|
||||
}
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "0.2.1"
|
||||
"version": "0.2.3"
|
||||
}
|
||||
+3
-3
@@ -52,9 +52,9 @@
|
||||
"url": "https://github.com/ziranlang/daochi-client.git"
|
||||
},
|
||||
{
|
||||
"commit": "c0932abe4a4cdb5b752375ec00aea80f80aae1af",
|
||||
"commit": "7d37be6e1f0643c01b35545e42e48c633f19a90d",
|
||||
"dependencies": {"daochi_client": "p9972fcdd2d5ba999", "kryon": "p3127065409ca96f6", "monocypher": "p809b4d31a48625a3", "qrcode": "p0dfa70137405b096"},
|
||||
"id": "p20f7b62c2c2002ee",
|
||||
"id": "p6feeecb5bfff3686",
|
||||
"name": "Entity",
|
||||
"ref": "master",
|
||||
"url": "https://github.com/waozixyz/entity.git"
|
||||
@@ -78,7 +78,7 @@
|
||||
}
|
||||
],
|
||||
"root": {
|
||||
"dependencies": {"entity": "p20f7b62c2c2002ee", "kryon": "p3127065409ca96f6", "qrcode": "p0dfa70137405b096"},
|
||||
"dependencies": {"entity": "p6feeecb5bfff3686", "kryon": "p3127065409ca96f6", "qrcode": "p0dfa70137405b096"},
|
||||
"name": "Dew"
|
||||
},
|
||||
"toolchain": {
|
||||
|
||||
Reference in new issue
Block a user