Skip to content

Commit

Permalink
Merge pull request #360 from dappforce/deploy/send
Browse files Browse the repository at this point in the history
Fix issue with wallet connection
  • Loading branch information
olehmell authored Aug 30, 2023
2 parents 0f3024c + a96b4c1 commit 4dd6913
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ function DisableNotificationButton({
}

return (
<Button size='lg' onClick={handleClickDisable} isLoading={isLoading}>
<Button
size='lg'
variant='redOutline'
onClick={handleClickDisable}
isLoading={isLoading}
>
Disable Notifications
</Button>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/chats/ChatForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default function ChatForm({
onError: (error, variables) => {
showErrorSendingMessageToast(
error,
'Create account failed',
'Creating account or sending message failed',
variables.message,
setMessageBody
)
Expand Down
8 changes: 4 additions & 4 deletions src/services/subsocial/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { SubsocialMutationConfig } from '@/subsocial-query/subsocial/types'
import { useMutation, UseMutationResult } from '@tanstack/react-query'

export function useWalletGetter() {
const address = useMyAccount((state) => state.address ?? '')
const signer = useMyAccount((state) => state.signer)

return async () => ({ address, signer })
return () => ({
address: useMyAccount.getState().address ?? '',
signer: useMyAccount.getState().signer,
})
}

export default function useCommonTxSteps<Data, ReturnValue>(
Expand Down
2 changes: 1 addition & 1 deletion src/subsocial-query/subsocial/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type Apis = {
}

export function useSubsocialMutation<Data, Context = undefined>(
getWallet: () => Promise<WalletAccount>,
getWallet: () => Promise<WalletAccount> | WalletAccount,
transactionGenerator: (
data: Data,
apis: Apis
Expand Down

0 comments on commit 4dd6913

Please sign in to comment.