Skip to content

Commit

Permalink
fix: snjs types
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Jun 6, 2022
1 parent 366f967 commit aca5f41
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ const ConfirmPassword: FunctionComponent<Props> = ({
setIsRegistering(true)
application
.register(email, password, isEphemeral, shouldMergeLocal)
.then((res) => {
if (res.error) {
throw new Error(res.error.message)
}
.then(() => {
viewControllerManager.accountMenuController.closeAccountMenu()
viewControllerManager.accountMenuController.setCurrentPane(AccountMenuPane.GeneralMenu)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,11 @@ const CreateAccount: FunctionComponent<Props> = ({ viewControllerManager, applic
setIsCreatingAccount(true)

try {
const response = await application.register(email, password)
if (response.error || response.data?.error) {
throw new Error(response.error?.message || response.data?.error?.message)
} else {
loadPurchaseFlowUrl(application).catch((err) => {
console.error(err)
application.alertService.alert(err).catch(console.error)
})
}
await application.register(email, password)
loadPurchaseFlowUrl(application).catch((err) => {
console.error(err)
application.alertService.alert(err).catch(console.error)
})
} catch (err) {
console.error(err)
application.alertService.alert(err as string).catch(console.error)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"@standardnotes/filepicker": "1.16.10",
"@standardnotes/icons": "^1.1.8",
"@standardnotes/sncrypto-web": "1.10.1",
"@standardnotes/snjs": "^2.115.3",
"@standardnotes/snjs": "^2.115.4",
"@standardnotes/stylekit": "5.29.3",
"@standardnotes/services": "^1.13.10",
"@zip.js/zip.js": "^2.4.10",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2489,10 +2489,10 @@
buffer "^6.0.3"
libsodium-wrappers "^0.7.9"

"@standardnotes/snjs@^2.115.3":
version "2.115.3"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.115.3.tgz#d82d51c88106c2801a00e9de1edd78f434e1e21a"
integrity sha512-XXp5Z3ThU0aUvVIIbtMFomoudXFQiE1Cf/EipKz2cFuQKcVswUcegYk8qIFwUBXYN/cwBzfkRyUA2dWR6kllCg==
"@standardnotes/snjs@^2.115.4":
version "2.115.4"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.115.4.tgz#eaf206cd8ddcfd502fc01d445fcf08b8e9caaf14"
integrity sha512-9Y1Uql0d1T9USgK/TalJSXauHW6orZCDsCBBN+AytmdH12Eph6Kv0+XOcxOzc2/D7B1Syor7a3wMalQH8v1RlQ==
dependencies:
"@standardnotes/api" "^1.1.3"
"@standardnotes/auth" "^3.19.2"
Expand Down

0 comments on commit aca5f41

Please sign in to comment.