Skip to content

Commit

Permalink
fix: waiting for encrypted string (#4705)
Browse files Browse the repository at this point in the history
## Explanation

This PR solves the bug of not awaiting for encrypted string in the user
storage

## References
## Changelog
### @metamask/profile-sync-controller 
- fixed awaiting for encryption to complete

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
  • Loading branch information
dovydas55 committed Sep 16, 2024
1 parent 1d12f7e commit 87cd863
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/profile-sync-controller/src/sdk/user-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class UserStorage {
try {
const headers = await this.#getAuthorizationHeader();
const storageKey = await this.getStorageKey();
const encryptedData = encryption.encryptString(data, storageKey);
const encryptedData = await encryption.encryptString(data, storageKey);
const encryptedPath = createEntryPath(path, storageKey);

const url = new URL(STORAGE_URL(this.env, encryptedPath));
Expand Down

0 comments on commit 87cd863

Please sign in to comment.