diff --git a/docs/openapi.yaml b/docs/openapi.yaml index 8cf0c4b..2047909 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -524,7 +524,7 @@ paths: schema: $ref: '#/components/schemas/Signature' 403: - description: Post does not belong to user, is not public or not saved to IPFS, or user's wallet address is not known + description: Post does not belong to user, is not public or not saved to IPFS, or user's wallet address is not known or not verified 404: description: Post not found 418: diff --git a/src/mastodon_api/statuses/views.rs b/src/mastodon_api/statuses/views.rs index 4718619..c61ee89 100644 --- a/src/mastodon_api/statuses/views.rs +++ b/src/mastodon_api/statuses/views.rs @@ -451,7 +451,8 @@ async fn get_signature( let current_user = get_current_user(db_client, auth.token()).await?; let blockchain_config = config.blockchain.as_ref() .ok_or(HttpError::NotSupported)?; - let wallet_address = current_user.wallet_address + // Wallet address must be public because minting exposes it + let wallet_address = current_user.public_wallet_address() .ok_or(HttpError::PermissionError)?; let post = get_post_by_id(db_client, &status_id).await?; if post.author.id != current_user.id || !post.is_public() || post.repost_of_id.is_some() {