Skip to content

Commit 079c815

Browse files
committed
fix: point credits funding at the /agent page
The credits funding handoff opened wallet.tempo.xyz/?action=fund&intent=credits. Now that agent payments live on a dedicated /agent page (wallet-next #549), point the `fund --credits` handoff at /agent?action=fund&intent=credits so it lands on — and auto-opens the deposit dialog on — that page. Other fund targets are unchanged.
1 parent ab4607f commit 079c815

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
tempo-wallet: patch
3+
---
4+
5+
Point the credits funding handoff URL at the dedicated /agent page.

crates/tempo-wallet/src/commands/fund/mod.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,12 @@ fn build_fund_url(auth_server_url: &str, target: &Target) -> Result<String, Temp
298298
source,
299299
})?;
300300

301-
url.set_path("/");
301+
// Credits funding lives on the dedicated /agent page; everything else opens the
302+
// wallet home with the relevant action.
303+
url.set_path(match target {
304+
Target::Credits => "/agent",
305+
_ => "/",
306+
});
302307
url.set_query(None);
303308

304309
{
@@ -517,7 +522,7 @@ mod tests {
517522
&Target::Credits
518523
)
519524
.unwrap(),
520-
"https://wallet.moderato.tempo.xyz/?action=fund&intent=credits"
525+
"https://wallet.moderato.tempo.xyz/agent?action=fund&intent=credits"
521526
);
522527
assert_eq!(
523528
build_fund_url(

crates/tempo-wallet/tests/remote_flows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ async fn fund_no_browser_credits_waits_for_credit_balance_change() {
776776
)
777777
.await;
778778
let temp = build_fund_temp(&rpc.base_url);
779-
let expected_url = format!("{}/?action=fund&intent=credits", rpc.base_url);
779+
let expected_url = format!("{}/agent?action=fund&intent=credits", rpc.base_url);
780780

781781
let output = test_command(&temp)
782782
.env("TEMPO_AUTH_URL", rpc.auth_url())

0 commit comments

Comments
 (0)