Skip to content

Commit

Permalink
fixes monitor author mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
crystalin committed May 22, 2023
1 parent 2d76621 commit b8d18a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/monitoring.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,10 @@ export const getAccountFromNimbusKey = async (
!authorMappingCache[nmbsKey] ||
authorMappingCache[nmbsKey].lastUpdate < Date.now() - 3600 * 1000
) {
const mappingData = (await api.query.authorMapping.mapping(nmbsKey)) as Option<any>;
const mappingData = (await api.query.authorMapping.mappingWithDeposit(nmbsKey)) as Option<any>;
authorMappingCache[nmbsKey] = {
lastUpdate: Date.now(),
account: mappingData.isEmpty ? null : ethereumEncode(mappingData.unwrap().toString()),
account: mappingData.isEmpty ? null : ethereumEncode(mappingData.unwrap().account.toString()),
};
}
const { account } = authorMappingCache[nmbsKey];
Expand Down

0 comments on commit b8d18a4

Please sign in to comment.