Skip to content

Commit

Permalink
undo old changes
Browse files Browse the repository at this point in the history
Signed-off-by: ryanwolhuter <[email protected]>
  • Loading branch information
ryanwolhuter committed Oct 11, 2023
1 parent c532087 commit 3a25c86
Show file tree
Hide file tree
Showing 5 changed files with 351 additions and 107 deletions.
9 changes: 5 additions & 4 deletions src/helpers/utils.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import pkg from '@/../package.json';
import { BigNumber } from '@ethersproject/bignumber';
import { formatEther } from '@ethersproject/units';
import { BigNumber } from '@ethersproject/bignumber';
import networks from '@snapshot-labs/snapshot.js/src/networks.json';
import voting from '@snapshot-labs/snapshot.js/src/voting';
import { getUrl } from '@snapshot-labs/snapshot.js/src/utils';
import getProvider from '@snapshot-labs/snapshot.js/src/utils/provider';
import voting from '@snapshot-labs/snapshot.js/src/voting';

export function shortenAddress(str = '') {
return `${str.slice(0, 6)}...${str.slice(str.length - 4)}`;
Expand Down Expand Up @@ -131,7 +131,8 @@ export function urlify(text: string, target = '_blank') {

export async function resolveEns(handle: string) {
try {
const provider = getProvider('1');
const broviderUrl = import.meta.env.VITE_BROVIDER_URL;
const provider = getProvider('1', { broviderUrl });
const addressResolved = await provider.resolveName(handle);
if (!addressResolved) throw new Error('Invalid ENS name');
return addressResolved;
Expand Down Expand Up @@ -171,4 +172,4 @@ export async function resolveLens(handle: string) {
console.error('Error in resolveLens:', error);
return null;
}
}
}
4 changes: 2 additions & 2 deletions src/plugins/safeSnap/components/Config.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<script>
<script>
import { clone } from '@snapshot-labs/snapshot.js/src/utils';
import { coerceConfig, isValidInput, getSafeHash } from '../index';
import { getIpfsUrl } from '@/helpers/utils';
Expand Down Expand Up @@ -97,4 +97,4 @@ export default {
/>
</div>
</div>
</template>
</template>
6 changes: 3 additions & 3 deletions src/plugins/safeSnap/components/Form/ContractInteraction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import Plugin, {
getContractTransactionData,
InterfaceDecoder
} from '../../index';
import { parseAmount } from '@/helpers/utils';
import { isAddress } from '@ethersproject/address';
import { isBigNumberish } from '@ethersproject/bignumber/lib/bignumber';
import { isAddress } from '@ethersproject/address';
import { parseAmount } from '@/helpers/utils';
import SafeSnapInputAddress from '../Input/Address.vue';
import SafeSnapInputMethodParameter from '../Input/MethodParameter.vue';
Expand Down Expand Up @@ -258,4 +258,4 @@ export default {
margin-top: 16px;
margin-bottom: 24px;
}
</style>
</style>
4 changes: 2 additions & 2 deletions src/plugins/safeSnap/components/Form/RawTransaction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Plugin, {
decodeTransactionData,
rawToModuleTransaction
} from '../../index';
import { parseAmount } from '@/helpers/utils';
import { isHexString } from '@ethersproject/bytes';
import { parseAmount } from '@/helpers/utils';
import SafeSnapInputAddress from '../Input/Address.vue';
export default {
Expand Down Expand Up @@ -137,4 +137,4 @@ export default {
margin-top: 16px;
margin-bottom: 24px;
}
</style>
</style>
Loading

0 comments on commit 3a25c86

Please sign in to comment.