Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit cd45f51

Browse files
committed
Line-length linting.
1 parent cb878f7 commit cd45f51

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

src/Session.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,23 @@ export default class Session extends EventEmitter {
4444
// TODO: move loginFunction to StreamrClient constructor where "auth type" is checked
4545
if (typeof this.options.privateKey !== 'undefined') {
4646
const wallet = new Wallet(this.options.privateKey)
47-
this.loginFunction = async () => this._client.loginEndpoints.loginWithChallengeResponse((d: string) => wallet.signMessage(d), wallet.address)
47+
this.loginFunction = async () => (
48+
this._client.loginEndpoints.loginWithChallengeResponse((d: string) => wallet.signMessage(d), wallet.address)
49+
)
4850
} else if (typeof this.options.ethereum !== 'undefined') {
4951
const provider = new Web3Provider(this.options.ethereum)
5052
const signer = provider.getSigner()
51-
this.loginFunction = async () => this._client.loginEndpoints.loginWithChallengeResponse((d: string) => signer.signMessage(d), await signer.getAddress())
53+
this.loginFunction = async () => (
54+
this._client.loginEndpoints.loginWithChallengeResponse((d: string) => signer.signMessage(d), await signer.getAddress())
55+
)
5256
} else if (typeof this.options.apiKey !== 'undefined') {
53-
this.loginFunction = async () => this._client.loginEndpoints.loginWithApiKey(this.options.apiKey!)
57+
this.loginFunction = async () => (
58+
this._client.loginEndpoints.loginWithApiKey(this.options.apiKey!)
59+
)
5460
} else if (typeof this.options.username !== 'undefined' && typeof this.options.password !== 'undefined') {
55-
this.loginFunction = async () => this._client.loginEndpoints.loginWithUsernamePassword(this.options.username!, this.options.password!)
61+
this.loginFunction = async () => (
62+
this._client.loginEndpoints.loginWithUsernamePassword(this.options.username!, this.options.password!)
63+
)
5664
} else {
5765
if (!this.options.sessionToken) {
5866
this.options.unauthenticated = true

src/rest/DataUnionEndpoints.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,12 @@ async function transportSignatures(client: StreamrClient, messageHash: Todo, opt
433433

434434
// template for withdraw functions
435435
// client could be replaced with AMB (mainnet and sidechain)
436-
async function untilWithdrawIsComplete(client: StreamrClient, getWithdrawTxFunc: (options: DataUnionOptions) => Todo, getBalanceFunc: (options: DataUnionOptions) => Todo, options: DataUnionOptions = {}) {
436+
async function untilWithdrawIsComplete(
437+
client: StreamrClient,
438+
getWithdrawTxFunc: (options: DataUnionOptions) => Todo,
439+
getBalanceFunc: (options: DataUnionOptions) => Todo,
440+
options: DataUnionOptions = {}
441+
) {
437442
const {
438443
pollingIntervalMs = 1000,
439444
retryTimeoutMs = 60000,

src/rest/StreamEndpoints.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,12 @@ export class StreamEndpoints {
217217
streamPartition,
218218
count,
219219
})
220-
const query = {
221-
count,
222-
}
223220

224-
const url = getEndpointUrl(this.client.options.restUrl, 'streams', streamId, 'data', 'partitions', streamPartition, 'last') + `?${qs.stringify(query)}`
221+
const url = (
222+
getEndpointUrl(this.client.options.restUrl, 'streams', streamId, 'data', 'partitions', streamPartition, 'last')
223+
+ `?${qs.stringify({ count })}`
224+
)
225+
225226
const json = await authFetch(url, this.client.session)
226227
return json
227228
}

0 commit comments

Comments
 (0)