This commit is contained in:
2026-05-01 20:29:09 +08:00
parent 8718472dbd
commit 87fbf41fab
137 changed files with 2922 additions and 989 deletions

View File

@@ -89,6 +89,30 @@ impl SpacetimeClient {
.await
}
pub async fn grant_new_user_registration_wallet_reward(
&self,
user_id: String,
) -> Result<RuntimeProfileDashboardRecord, SpacetimeClientError> {
let procedure_input = build_runtime_profile_dashboard_get_input(user_id)
.map_err(|error| SpacetimeClientError::Runtime(error.to_string()))?
.into();
self.call_after_connect(move |connection, sender| {
connection
.procedures()
.grant_new_user_registration_wallet_reward_then(
procedure_input,
move |_, result| {
let mapped = result
.map_err(|error| SpacetimeClientError::Procedure(error.to_string()))
.and_then(map_runtime_profile_wallet_adjustment_procedure_result);
send_once(&sender, mapped);
},
);
})
.await
}
pub async fn consume_profile_wallet_points(
&self,
user_id: String,