Skip to content

Commit

Permalink
refactor(bundles ans-104): use owner address from data item instead o…
Browse files Browse the repository at this point in the history
…f rehashing

Prior to this change we were hashing the owner key to get the owner
address. This change uses the owner address from the data item instead.
These should always be the same value so rehashing is unnecessary.

Note: I ran a test comparing the values and on the sample of data items
I processed there were no differences.
  • Loading branch information
djwhitt committed Jul 13, 2023
1 parent c57184f commit 3c702ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/database/standalone-sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export function dataItemToDbRows(item: NormalizedDataItem, height?: number) {
}

const ownerBuffer = fromB64Url(item.owner);
const ownerAddressBuffer = ownerToAddress(ownerBuffer);
const ownerAddressBuffer = fromB64Url(item.owner_address);

wallets.push({ address: ownerAddressBuffer, public_modulus: ownerBuffer });

Expand Down

0 comments on commit 3c702ef

Please sign in to comment.