Skip to content

hiveOperationAuthority does not match Hive consensus for owner changes, and cannot express mixed custom_json #3535

Description

@feruzm

resolveOperationAuthority in src/utils/hiveOperationAuthority.ts:37 maps an account_update2 payload that sets owner to 'active'. Hive requires owner authority for that change. Hive's own test matrix has both the active-signed update and the posting-signed update failing (https://gitlab.syncad.com/hive/hive/-/issues/520).

The function is typed (operation: Operation) => 'posting' | 'active', so it cannot express 'owner' at all. src/utils/hiveOperationAuthority.test.ts has no owner case either.

Why it is reachable: the resolver serves the hive-uri path (src/providers/hive/hive.ts:750 and src/hooks/useLinkProcessor.tsx:648), where operations arrive from an external link. A hive://sign/... link whose account_update2 sets owner is currently routed to active signing. The broadcast is then rejected on chain, so the user sees a confusing failure rather than a clear "not supported" message.

Mobile has no owner signing path regardless: mobilePlatformAdapter.ts decrypts only the posting plus active keys and does not implement getOwnerKey, so @ecency/sdk's case 'owner' throws "Owner key not supported by adapter".

Suggested fix: widen the return type to include 'owner', return it when the payload sets owner, then have the hive-uri path reject an owner-authority transaction with an explicit unsupported message instead of attempting an active signature. Add the missing owner test.

Related: @ecency/sdk's OPERATION_AUTHORITY_MAP has the same flat account_update2: 'active' entry, with no payload inspection in getOperationAuthority, so the shared map carries this gap too. Worth a companion issue on vision-web if we want the SDK to be authoritative here.

Found while correcting the add-mutation skill in #3534. That PR documents the correct three-row rule plus this gap; it does not change the resolver.

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