Skip to content

Commit

Permalink
fix: Alias payload is missing (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaituVR authored Oct 7, 2023
1 parent 4128b4b commit 0d3a7f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ingestor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default async function ingestor(req) {
type: message.type,
app: kebabCase(message.app || '')
};

if (type === 'alias') payload = { alias: message.alias };
if (type === 'statement') payload = { about: message.about, statement: message.statement };
if (type === 'delete-proposal') payload = { proposal: message.proposal };
if (type === 'update-proposal') {
Expand Down
5 changes: 3 additions & 2 deletions src/writer/alias.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ export async function verify(message): Promise<any> {
}

export async function action(message, ipfs, receipt, id): Promise<void> {
const msg = jsonParse(message.msg);
const params = {
id,
ipfs,
address: getAddress(message.from),
alias: getAddress(message.alias),
address: getAddress(message.address),
alias: getAddress(msg.payload.alias),
created: message.timestamp
};
await db.queryAsync('INSERT IGNORE INTO aliases SET ?', params);
Expand Down

0 comments on commit 0d3a7f5

Please sign in to comment.