File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -356,7 +356,11 @@ export class AccountController {
356356 const balance = balances [ 0 ] ;
357357 if ( ! balance || + balance . amount < TESTNET_MINIMUM_BALANCE * Math . pow ( 10 , DEFAULT_DENOM_EXPONENT ) ) {
358358 // 3.1 If it's less then required for DID creation - assign new portion from testnet-faucet
359- const resp = await FaucetHelper . delegateTokens ( testnetAccount . address ) ;
359+ const resp = await FaucetHelper . delegateTokens (
360+ testnetAccount . address ,
361+ customerEntity . name ,
362+ customerEntity . email
363+ ) ;
360364 if ( resp . status !== StatusCodes . OK ) {
361365 return response . status ( StatusCodes . BAD_GATEWAY ) . json ( {
362366 error : resp . error ,
@@ -539,7 +543,11 @@ export class AccountController {
539543 const balance = balances [ 0 ] ;
540544 if ( ! balance || + balance . amount < TESTNET_MINIMUM_BALANCE * Math . pow ( 10 , DEFAULT_DENOM_EXPONENT ) ) {
541545 // 3.1 If it's less then required for DID creation - assign new portion from testnet-faucet
542- const resp = await FaucetHelper . delegateTokens ( testnetAccount . address ) ;
546+ const resp = await FaucetHelper . delegateTokens (
547+ testnetAccount . address ,
548+ customerEntity . name ,
549+ customerEntity . email
550+ ) ;
543551
544552 if ( resp . status !== StatusCodes . OK ) {
545553 return response . status ( StatusCodes . BAD_GATEWAY ) . json ( {
Original file line number Diff line number Diff line change @@ -3,11 +3,13 @@ import { MINIMAL_DENOM, FAUCET_URI } from '../types/constants.js';
33
44export class FaucetHelper {
55 // ...
6- static async delegateTokens ( address : string ) : Promise < ICommonErrorResponse > {
6+ static async delegateTokens ( address : string , name : string , email : string ) : Promise < ICommonErrorResponse > {
77 const faucetURI = FAUCET_URI ;
88 const faucetBody = {
99 denom : MINIMAL_DENOM ,
1010 address : address ,
11+ email,
12+ name,
1113 } ;
1214 const response = await fetch ( faucetURI , {
1315 headers : {
You can’t perform that action at this time.
0 commit comments