Skip to content

Commit

Permalink
use xaman account directly in poll choices
Browse files Browse the repository at this point in the history
  • Loading branch information
ebedoise committed Aug 1, 2024
1 parent 0dd88ac commit fdfb1df
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion apps/poll/src/Choices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useGetPollByIdQuery, useVoteMutation } from '@3shop/apollo';
import type { Nullable } from '@3shop/types';
import { Box, Flex, Spinner, useDisclosure, Heading, useToast, Text, styled } from '@3shop/ui';

import { useAccount } from '@3shop/wallet';
import { useAccount } from '@3shop/wallet/internal/xaman/XamanWalletProvider';
import { useState, useEffect } from 'react';
import { useParams } from 'react-router-dom';
import { ChoiceItem } from './ChoiceItem';
Expand Down
6 changes: 0 additions & 6 deletions packages/wallet/pickWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ import { envVars } from '@3shop/config';

const xaman = envVars['NETWORK'] === Network_Enum.Xrpledger;
export const useAccount = (...args: Parameters<typeof useRainbowAccount>) => {
console.log('envVars: ', envVars['NETWORK']);
console.log('Network_Enum: ', Network_Enum);
console.log('xaman: ', xaman);
if (xaman)
{
console.log('useXamanAccount: ', useXamanAccount());
return useXamanAccount();
}
return useRainbowAccount(...args);
}

0 comments on commit fdfb1df

Please sign in to comment.