forked from onflow/fcl-js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-get-events.js
29 lines (24 loc) · 906 Bytes
/
build-get-events.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import {pipe, Ok, makeGetEvents} from "../interaction/interaction.js"
export function getEvents(eventType, start, end) {
if (typeof start !== "undefined" || typeof end !== "undefined") {
console.warn(
`
%cFCL/SDK Deprecation Notice
============================
Passing a start and end into getEnvents has been deprecated and will not be supported in future versions of the Flow JS-SDK/FCL.
You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0005-deprecate-start-end-get-events-builder
============================
`,
"font-weight:bold;font-family:monospace;"
)
}
return pipe([
makeGetEvents,
ix => {
ix.events.eventType = eventType
ix.events.start = start
ix.events.end = end
return Ok(ix)
},
])
}