on master help sign in
fix: only management proxy mnemonic can be used to derive network seed
5afece3Matt Condon (shrugs)
src/lib/keys.js+3−4
@@ -106,12 +106,11 @@ export const deriveNetworkSeedFromMnemonic = async (
106 details,
106 details,
107 revision = 1
107 revision = 1
108) => {
108) => {
109− const isOwner = eqAddr(wallet.address, details.owner);
110 const isManagementProxy = eqAddr(wallet.address, details.managementProxy);
109 const isManagementProxy = eqAddr(wallet.address, details.managementProxy);
111
110
112− // the network seed is only derivable from mnemonic if the derived
111+ // the network seed is derivable from mnemonic iff the management proxy
113− // management seed or owner equals the record we have on chain
112+ // is this mnemonic
114− if (isOwner || isManagementProxy) {
113+ if (isManagementProxy) {
115 return await deriveNetworkSeedFromSeed(authMnemonic, revision);
114 return await deriveNetworkSeedFromSeed(authMnemonic, revision);
116 }
115 }
117
116