From 9fb8ed9c4b881271876d68bd52209909d4fe89ea Mon Sep 17 00:00:00 2001 From: hide-on-bush-x Date: Wed, 7 Dec 2022 11:25:31 -0300 Subject: [PATCH] Updating credit score usage --- src/credit-score/create.ts | 2 +- src/utils/templates.ts | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/credit-score/create.ts b/src/credit-score/create.ts index db50f6b1..90619a3d 100644 --- a/src/credit-score/create.ts +++ b/src/credit-score/create.ts @@ -19,7 +19,7 @@ export const createCreditScore = async ( return result; } - const msg = Templates.creditScoreTemplate(identityId.toString(), address); + const msg = Templates.creditScoreTemplate(identityId.toString(), new Date().toISOString(), address); console.log(`Signer Address: '${address}'`); console.log(`Signing: \n'${msg}'\n`); diff --git a/src/utils/templates.ts b/src/utils/templates.ts index 6f31dc67..fc536176 100644 --- a/src/utils/templates.ts +++ b/src/utils/templates.ts @@ -20,7 +20,7 @@ Challenge: ${challenge}`, * @param lastUpdated The date of the credit score generation process * @param wallet The address of the wallet used in the credit score generation process */ - creditScoreTemplate: (value: string, lastUpdated: string, wallet: string) => + creditScoreTemplate: (value: string, lastUpdated: string, wallet: string) => `${value};${lastUpdated};${wallet}`, /** @@ -32,12 +32,4 @@ Challenge: ${challenge}`, twoFATemplate: (identityId: string, phoneNumber: string, code: string) => `Identity: ${identityId} Phone Number: ${phoneNumber} Code: ${code}`, - /** - * The Masa Finance Credit Score Template used for creating credit score tokens - * @param value The value of the credit score - * @param lastUpdated The date of the credit score generation process - * @param wallet The address of the wallet used in the credit score generation process - */ - sssbtCreditScoreTemplate: (value: string, lastUpdated: string, wallet: string) => - `${value};${lastUpdated};${wallet}`, };