From 7b1508a7d8199fb3c64406e27cb90f8c60094a4e Mon Sep 17 00:00:00 2001 From: Broken Pipe <54848194+btwiuse@users.noreply.github.com> Date: Wed, 20 Nov 2024 15:08:38 +0800 Subject: [PATCH] fix typo: Update README.md transcations -> transactions --- frontend/packages/ez-transactions/README.md | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/frontend/packages/ez-transactions/README.md b/frontend/packages/ez-transactions/README.md index 02b3adf7d..61630bf00 100644 --- a/frontend/packages/ez-transactions/README.md +++ b/frontend/packages/ez-transactions/README.md @@ -1,4 +1,4 @@ -# @dapps-frontend/ez-transcations +# @dapps-frontend/ez-transactions A library to provide gasless and signless transactions. By interacting with a Gear program via voucher, gasless backend and local account it allows users to make transactions without paying gas fees or signing on-chain transactions. @@ -6,7 +6,7 @@ By interacting with a Gear program via voucher, gasless backend and local accoun ## Install: ```sh -yarn add @dapps-frontend/ez-transcations +yarn add @dapps-frontend/ez-transactions ``` ## Gasless-transactions @@ -15,10 +15,10 @@ The gas fees, which are usually required to execute transactions on the blockcha ### Provider -Import `GaslessTransactionsProvider` from `@dapps-frontend/ez-transcations` in your `index.tsx` and wrap your application with it. You should pass the required arguments: +Import `GaslessTransactionsProvider` from `@dapps-frontend/ez-transactions` in your `index.tsx` and wrap your application with it. You should pass the required arguments: ```jsx -import { GaslessTransactionsProvider } from '@dapps-frontend/ez-transcations'; +import { GaslessTransactionsProvider } from '@dapps-frontend/ez-transactions'; @@ -100,7 +100,7 @@ return ( The package provides a `useSignlessTransactions` hook that returns a context with all required properties: ```jsx -import { useSignlessTransactions } from '@dapps-frontend/ez-transcations'; +import { useSignlessTransactions } from '@dapps-frontend/ez-transactions'; const signlessContext = useSignlessTransactions(); @@ -119,7 +119,7 @@ Combined Workflow: `EzTransactionsProvider` implements logic that allows the use of gasless and signless transactions together, e.g. disabling gasless when signless is active and requesting a voucher before a signless session is created. It uses both the signless and gasless contexts, so it needs to be wrapped by `GaslessTransactionsProvider` and `SignlessTransactionsProvider`. ```jsx -import { EzTransactionsProvider } from '@dapps-frontend/ez-transcations'; +import { EzTransactionsProvider } from '@dapps-frontend/ez-transactions'; return {children}; ``` @@ -127,7 +127,7 @@ return {children}; The package provides a `useEzTransactions` hook that returns both gasless and signless contexts: ```jsx -import { useEzTransactions } from '@dapps-frontend/ez-transcations'; +import { useEzTransactions } from '@dapps-frontend/ez-transactions'; const { gasless, signless } = useEzTransactions(); ``` @@ -137,7 +137,7 @@ const { gasless, signless } = useEzTransactions(); To work with signless and gasless transactions together, sending transactions requires a `sessionForAccount` parameter and using `pair` as the sender's account. Also, the `voucherId` needs to be requested. `usePrepareEzTransactionParams` implements this logic: ```jsx -import { usePrepareEzTransactionParams } from '@dapps-frontend/ez-transcations'; +import { usePrepareEzTransactionParams } from '@dapps-frontend/ez-transactions'; const { prepareEzTransactionParams } = usePrepareEzTransactionParams(); @@ -153,7 +153,7 @@ const sendMessage = async () => { The package provides components for enabling and disabling gasless and signless transactions. ```jsx -import { EzSignlessTransactions, EzGaslessTransactions, EzTransactionsSwitch } from '@dapps-frontend/ez-transcations'; +import { EzSignlessTransactions, EzGaslessTransactions, EzTransactionsSwitch } from '@dapps-frontend/ez-transactions'; // Buttons