|
1 | 1 | # @onflow/fcl-wc
|
2 | 2 |
|
| 3 | +## 5.5.0-alpha.5 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- [#1970](https://github.com/onflow/fcl-js/pull/1970) [`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26) Thanks [@jribbink](https://github.com/jribbink)! - Add UI notifications for pending requests |
| 8 | + |
| 9 | +### Patch Changes |
| 10 | + |
| 11 | +- Updated dependencies [[`3b31f1c02b78bf178502627e5ca1de81bdfe8f26`](https://github.com/onflow/fcl-js/commit/3b31f1c02b78bf178502627e5ca1de81bdfe8f26)]: |
| 12 | + - @onflow/fcl-core@1.13.0-alpha.5 |
| 13 | + |
3 | 14 | ## 5.4.1-alpha.4
|
4 | 15 |
|
5 | 16 | ### Patch Changes
|
|
453 | 464 | ```javascript
|
454 | 465 | import * as fcl from "@onflow/fcl"
|
455 | 466 | import {initFclWc} from "@onflow/fcl-wc"
|
456 |
| - |
| 467 | + |
457 | 468 | const {FclConnectServicePlugin, client} = await initFclWc({
|
458 | 469 | projectId: PROJECT_ID,
|
459 | 470 | metadata: {
|
|
463 | 474 | icons: ["https://avatars.githubusercontent.com/u/62387156?s=280&v=4"],
|
464 | 475 | },
|
465 | 476 | })
|
466 |
| - |
| 477 | + |
467 | 478 | fcl.pluginRegistry.add(FclConnectServicePlugin)
|
468 | 479 | ```
|
469 | 480 |
|
470 | 481 | ### Using the client
|
471 | 482 |
|
472 | 483 | ```javascript
|
473 | 484 | import {getSdkError} from "@onflow/fcl-wc"
|
474 |
| - |
| 485 | + |
475 | 486 | client.on("session_update", ({topic, params}) => {
|
476 | 487 | const session = client.session.get(topic)
|
477 | 488 | console.log("EVENT", "session_update", {topic, params, session})
|
478 | 489 | })
|
479 |
| - |
| 490 | + |
480 | 491 | await client.disconnect({
|
481 | 492 | topic: session.topic,
|
482 | 493 | reason: getSdkError("USER_DISCONNECTED"),
|
|
647 | 658 | ```javascript
|
648 | 659 | import * as fcl from "@onflow/fcl"
|
649 | 660 | import {initFclWc} from "@onflow/fcl-wc"
|
650 |
| - |
| 661 | + |
651 | 662 | const {FclConnectServicePlugin, client} = await initFclWc({
|
652 | 663 | projectId: PROJECT_ID,
|
653 | 664 | metadata: {
|
|
657 | 668 | icons: ["https://avatars.githubusercontent.com/u/62387156?s=280&v=4"],
|
658 | 669 | },
|
659 | 670 | })
|
660 |
| - |
| 671 | + |
661 | 672 | fcl.pluginRegistry.add(FclConnectServicePlugin)
|
662 | 673 | ```
|
663 | 674 |
|
664 | 675 | ### Using the client
|
665 | 676 |
|
666 | 677 | ```javascript
|
667 | 678 | import {getSdkError} from "@onflow/fcl-wc"
|
668 |
| - |
| 679 | + |
669 | 680 | client.on("session_update", ({topic, params}) => {
|
670 | 681 | const session = client.session.get(topic)
|
671 | 682 | console.log("EVENT", "session_update", {topic, params, session})
|
672 | 683 | })
|
673 |
| - |
| 684 | + |
674 | 685 | await client.disconnect({
|
675 | 686 | topic: session.topic,
|
676 | 687 | reason: getSdkError("USER_DISCONNECTED"),
|
|
0 commit comments