Skip to content

Commit

Permalink
Merge pull request #131 from jupiter-project/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
joramirezStackit authored Jan 29, 2022
2 parents 05de44e + 8d206fd commit 913956f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion config/apn.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ const IS_PRODUCTION = appConf.isProduction;
// const IS_PRODUCTION = ['qa', 'staging', 'production'].includes(process.env.NODE_ENV);

const getApnOptions = () => ({
pfx: join(__dirname, '../certificates', 'apn.p12'),
pfx: Buffer.from(process.env.P12_CERT, 'base64'),
// pfx: join(__dirname, '../certificates', 'apn.p12'),
passphrase: process.env.APN_PASSPHRASE,
production: IS_PRODUCTION,
});
Expand Down
8 changes: 6 additions & 2 deletions services/accountRegistrationService.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class AccountRegistration {
return newAccountProperties;
}catch(error){
logger.error(`****************************************************************`);
logger.error(`** createNewAccountAndRegister(newAccountAliasName, newAccountPassword).catch(error)`);
logger.error(`** createNewAccount(newAccountPassword).catch(error)`);
logger.error(`****************************************************************`);
logger.error(`error= ${error}`)
throw error;
Expand Down Expand Up @@ -246,6 +246,10 @@ class AccountRegistration {
logger.info(`-__-__-__-__-__-__-__-__-__-__-__-__-__-__-__--\n`);
const provideInitialStandardUserFundsResponse = await this.jupiterFundingService.provideInitialStandardUserFunds(newAccountProperties);
const transactionIdForUserFundingTransactionId = provideInitialStandardUserFundsResponse.data.transaction;

logger.info(`-__-__-__-__-__-__-__-__-__-__-__-__-__-__-__--`);
logger.info(` Waiting for money to be confirmed`);
logger.info(`-__-__-__-__-__-__-__-__-__-__-__-__-__-__-__--\n`);
await this.jupiterFundingService.waitForTransactionConfirmation(transactionIdForUserFundingTransactionId);
// Third: Add the UserRecord transaction
console.log(`\n`);
Expand All @@ -270,7 +274,7 @@ class AccountRegistration {
return;
}catch(error){
logger.error(`****************************************************************`);
logger.error(`** createNewAccountAndRegister(newAccountAliasName, newAccountPassword).catch(error)`);
logger.error(`** register3(newAccountProperties, newAccountAliasName).catch(error)`);
logger.error(`****************************************************************`);
logger.error(`error= ${error}`)
throw error;
Expand Down
2 changes: 1 addition & 1 deletion services/jupiterAPIService.js
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ class JupiterAPIService {
* @param {GravityAccountProperties} toAccountProperties
* @param {int} amountNqt
* @param {number} feeNqt
* @returns {Promise<{"signatureHash","transactionJSON":{"senderPublicKey","signature","feeNQT","type","fullHash","version","phased","ecBlockId","signatureHash","attachment":{"versionOrdinaryPayment"},"senderRS","subtype","amountNQT","sender","recipientRS","recipient","ecBlockHeight","deadline","transaction","timestamp","height"},"unsignedTransactionBytes","broadcasted","requestProcessingTime","transactionBytes","fullHash","transaction"}>}
* @returns {Promise<{"signatureHash",data: {"transactionJSON":{"senderPublicKey","signature","feeNQT","type","fullHash","version","phased","ecBlockId","signatureHash","attachment":{"versionOrdinaryPayment"},"senderRS","subtype","amountNQT","sender","recipientRS","recipient","ecBlockHeight","deadline","transaction","timestamp","height"},"unsignedTransactionBytes","broadcasted","requestProcessingTime","transactionBytes","fullHash","transaction"}, transaction}>}
*/
async transferMoney(fromAccountProperties, toAccountProperties, amountNqt, feeNqt = this.appProps.feeNQT) {
logger.verbose(`#### transferMoney(fromJupiterAccount, toAccountProperties, amount, feeNQT)`);
Expand Down

0 comments on commit 913956f

Please sign in to comment.