Skip to content

Commit

Permalink
CARD-56: App: upgrade Firebase and optimize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrosoft committed Nov 19, 2018
1 parent c499862 commit 71e6d8a
Show file tree
Hide file tree
Showing 8 changed files with 1,645 additions and 367 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ functions/**/*.js.map
# dotenv environment variables file
.env

.firebase
.runtimeconfig.json

## React
Expand Down
4 changes: 2 additions & 2 deletions functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"dependencies": {
"bitcoinjs-lib": "git://github.com/bobrosoft/bitcoinjs-lib.git#77d7780534c4159ada2d03010b487373db02f150",
"cors": "^2.8.4",
"firebase-admin": "~4.2.1",
"firebase-functions": "^0.5.7",
"firebase-admin": "~6.1.0",
"firebase-functions": "^2.1.0",
"imap-simple": "^3.2.0",
"node-fetch": "^1.7.3"
},
Expand Down
4 changes: 3 additions & 1 deletion functions/src/services/bitcoin-cash-blockchain.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,15 @@ export class BitcoinCashBlockchainService extends BlockchainService {
throw new ApiError(e.message, ApiErrorCode.HTTP_REQUEST_ERROR);
})
.then((data: any) => {
console.log('pushTransaction response:', data);

if (!data.txid) {
throw new ApiError(JSON.stringify(data), ApiErrorCode.HTTP_REQUEST_ERROR);
}

return {
network: this.config.blockchain.network,
txId: data.txid.result
txId: data.txid
};
})
;
Expand Down
Loading

0 comments on commit 71e6d8a

Please sign in to comment.