You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/data-services.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -432,7 +432,7 @@ const gasPricesService = new GasPricesService({
432
432
433
433
Great! Now that we've set up the data service and its messenger action, we can use it somewhere else.
434
434
435
-
Let's say we wanted to use it in a controller. We'd just need to allow that controller's messenger access to `GasPricesService:fetchGasPrices`by delegating it from the root messenger.
435
+
Let's say we wanted to use `GasPricesService:fetchGasPrices` in a controller. First, that controller's messenger would need to include `GasPricesService:fetchGasPrices`in its type defintion.
436
436
437
437
This code would probably be in the controller package itself. For instance, if we had a file `packages/send-controller/send-controller.ts`, we might have:
438
438
@@ -454,6 +454,15 @@ type SendControllerMessenger = Messenger<
454
454
>;
455
455
```
456
456
457
+
Then we'll need to allow that controller's messenger access to `GasPricesService:fetchGasPrices` by delegating it from the root messenger:
0 commit comments