fix: pr fixes

This commit is contained in:
Taranto 2020-03-20 17:55:55 +00:00 committed by Josh Harvey
parent fa69d2a030
commit 1cc3c820b5
3 changed files with 6 additions and 5 deletions

View file

@ -79,9 +79,9 @@ function newFunding (account, cryptoCode) {
function getStatus (account, toAddress, cryptoAtoms, cryptoCode) {
const elapsed = Date.now() - t0
if (elapsed < PUBLISH_TIME) return Promise.resolve({ receivedCryptoAtoms: cryptoAtoms - 10, status: 'notSeen' })
if (elapsed < AUTHORIZE_TIME) return Promise.resolve({ receivedCryptoAtoms: cryptoAtoms - 10, status: 'published' })
if (elapsed < CONFIRM_TIME) return Promise.resolve({ receivedCryptoAtoms: null, status: 'authorized' })
if (elapsed < PUBLISH_TIME) return Promise.resolve({ receivedCryptoAtoms: BN(0), status: 'notSeen' })
if (elapsed < AUTHORIZE_TIME) return Promise.resolve({ receivedCryptoAtoms: cryptoAtoms, status: 'published' })
if (elapsed < CONFIRM_TIME) return Promise.resolve({ receivedCryptoAtoms: cryptoAtoms, status: 'authorized' })
console.log('[%s] DEBUG: Mock wallet has confirmed transaction [%s]', cryptoCode, toAddress.slice(0, 5))