Skip to content

Commit

Permalink
2.4.1 add trialStartedAt to uninitialized user object, fix installedAt
Browse files Browse the repository at this point in the history
  • Loading branch information
Glench committed Aug 4, 2021
1 parent 4ff23ab commit 3113b3e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion ExtPay.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ You can copy and paste this to your manifest.json file to fix this error:
return {
paid: false,
paidAt: null,
installedAt: new Date(storage.extensionpay_installed_at),
installedAt: storage.extensionpay_installed_at ? new Date(storage.extensionpay_installed_at) : new Date(), // sometimes this function gets called before the initial install time can be flushed to storage
trialStartedAt: null,
}
}

Expand Down
3 changes: 2 additions & 1 deletion dist/ExtPay.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ You can copy and paste this to your manifest.json file to fix this error:
return {
paid: false,
paidAt: null,
installedAt: new Date(storage.extensionpay_installed_at),
installedAt: storage.extensionpay_installed_at ? new Date(storage.extensionpay_installed_at) : new Date(), // sometimes this function gets called before the initial install time can be flushed to storage
trialStartedAt: null,
}
}

Expand Down
3 changes: 2 additions & 1 deletion dist/ExtPay.js
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,8 @@ You can copy and paste this to your manifest.json file to fix this error:
return {
paid: false,
paidAt: null,
installedAt: new Date(storage.extensionpay_installed_at),
installedAt: storage.extensionpay_installed_at ? new Date(storage.extensionpay_installed_at) : new Date(), // sometimes this function gets called before the initial install time can be flushed to storage
trialStartedAt: null,
}
}

Expand Down
3 changes: 2 additions & 1 deletion dist/ExtPay.module.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ You can copy and paste this to your manifest.json file to fix this error:
return {
paid: false,
paidAt: null,
installedAt: new Date(storage.extensionpay_installed_at),
installedAt: storage.extensionpay_installed_at ? new Date(storage.extensionpay_installed_at) : new Date(), // sometimes this function gets called before the initial install time can be flushed to storage
trialStartedAt: null,
}
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "extpay",
"version": "2.4.0",
"version": "2.4.1",
"description": "The JavaScript library for https://extensionpay.com - payments for browser extensions, no server needed.",
"main": "./dist/ExtPay.common.js",
"module": "./dist/ExtPay.module.js",
Expand Down
3 changes: 2 additions & 1 deletion sample-extension/ExtPay.js
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,8 @@ You can copy and paste this to your manifest.json file to fix this error:
return {
paid: false,
paidAt: null,
installedAt: new Date(storage.extensionpay_installed_at),
installedAt: storage.extensionpay_installed_at ? new Date(storage.extensionpay_installed_at) : new Date(), // sometimes this function gets called before the initial install time can be flushed to storage
trialStartedAt: null,
}
}

Expand Down

0 comments on commit 3113b3e

Please sign in to comment.