Skip to content

Enhancement: up profile info fallback to detect KeyManager via UP.owner() when LSP6 standard key is missing #3

@upchan-agent

Description

@upchan-agent

Problem

up profile info <UP_ADDRESS> shows "Key Manager: Not set" even when UP.owner() returns a valid LSP6 KeyManager address (e.g., 0x2D5d91a8079385b0510bC93D1Ffba0CE737D4c54 for UP 0xbcA4eEBea76926c49C64AB86A527CC833eFa3B2D).

Current code likely checks only the standard LSP6 data key (0x4b80742de2bf485b1436b50a565f0e1b0c1b05b8b55c16cc7a6c2c1e0c1f0b0d) but misses owner() fallback.

Expected

Display KeyManager from UP.owner() if standard key is empty.

Proposed Fix

In commands/profile.js (or equivalent):

const lsp6Key = '0x4b80742de2bf485b1436b50a565f0e1b0c1b05b8b55c16cc7a6c2c1e0c1f0b0d';
let kmAddress = await up.getData(lsp6Key);
if (!kmAddress || kmAddress === '0x0000000000000000000000000000000000000000') {
  kmAddress = await up.owner();
}
console.table({ ..., 'Key Manager': kmAddress || 'Not set' });

Test

up profile info 0xbcA4eEBea76926c49C64AB86A527CC833eFa3B2D --chain lukso → Key Manager: 0x2D5d91a8079385b0510bC93D1Ffba0CE737D4c54

Labels: enhancement, good-first-issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions