|
@@ -252,14 +252,16 @@ pub async fn redeem_invite(
|
|
|
invite: &lox_library::cred::Invitation,
|
|
|
lox_pub: &IssuerPubKey,
|
|
|
invitation_pub: &IssuerPubKey,
|
|
|
-) -> lox_library::cred::Lox {
|
|
|
+) -> (lox_library::cred::Lox, [BridgeLine; MAX_BRIDGES_PER_BUCKET]) {
|
|
|
let (req, state) =
|
|
|
redeem_invite::request(invite, invitation_pub, get_today(net).await).unwrap();
|
|
|
let encoded_req: Vec<u8> = serde_json::to_vec(&req).unwrap();
|
|
|
let encoded_resp = net.request("/redeem".to_string(), encoded_req).await;
|
|
|
let decoded_resp: redeem_invite::Response = serde_json::from_slice(&encoded_resp).unwrap();
|
|
|
let cred = redeem_invite::handle_response(state, decoded_resp, lox_pub).unwrap();
|
|
|
- cred
|
|
|
+
|
|
|
+ let bucket = get_bucket(net, &cred).await;
|
|
|
+ (cred, bucket)
|
|
|
}
|
|
|
|
|
|
// Check for a migration credential to move to a new bucket
|