rxjs/operators#first JavaScript Examples
The following examples show how to use
rxjs/operators#first.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: script.js From payroll-app with GNU Affero General Public License v3.0 | 6 votes |
retryEvery(async retry => {
app
.call('finance')
.pipe(first())
.toPromise()
.then(financeAddress => app.external(financeAddress, financeAbi))
.then(finance =>
finance
.vault()
.pipe(first())
.toPromise()
)
.then(initialize)
.catch(err => {
console.error('Could not start background script execution due:', err)
retry()
})
})
Example #2
Source File: tokens.js From payroll-app with GNU Affero General Public License v3.0 | 5 votes |
export function getDenominationToken() {
return app
.call('denominationToken')
.pipe(first())
.pipe(map(getToken))
.toPromise()
}
Example #3
Source File: tokens.js From payroll-app with GNU Affero General Public License v3.0 | 5 votes |
function loadTokenDecimals(address) {
return app
.external(address, tokenDecimalsAbi)
.decimals()
.pipe(first())
.pipe(map(value => parseInt(value)))
.toPromise()
}
Example #4
Source File: tokens.js From payroll-app with GNU Affero General Public License v3.0 | 5 votes |
function loadTokenSymbol(address) {
return app
.external(address, tokenSymbolAbi)
.symbol()
.pipe(first())
.toPromise()
}