thingco / shared-frontend-libs

0 stars 0 forks source link

[FEAT] - remove redundant type for change PIN callback #77

Closed DanCouper closed 2 years ago

DanCouper commented 3 years ago

Which package is this related to?

Specify the package, or if it is a new package suggest a name.

If this covers multiple packages, if possible open an issue for both and PR separately: this will keep the PR's scope as small as possible (plus each package needs separate version bumps & republishing after the fix has been applied).

Is your feature request related to a problem? Please describe. Extracted from PR #73

packages/authentication/src/auth-system-hook-callbacks.ts
@@ -81,7 +81,7 @@ export type SetNewPinCb = (pin: string) => Promise<any>;
 * Change an existing PIN. This to be used when there is already a PIN set; the `SetNewPinCb` is
 * for adding a brand-new PIN.
 */
export type ChangePinCb = (oldPin: string, newPin: string) => Promise<any>;
export type ChangePinCb = (newPin: string) => Promise<any>;

Can actually just reuse the SetNewPinCb type now, as it's exactly the same now that it just takes the single argument.