Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
experimental: switch workstream storage to ipfs
Browse files Browse the repository at this point in the history
  • Loading branch information
efstajas committed Sep 8, 2022
1 parent c553dfa commit a749d6b
Show file tree
Hide file tree
Showing 60 changed files with 676 additions and 2,352 deletions.
28 changes: 28 additions & 0 deletions src/lib/api/drips-subgraph/__generated__/DripsAccountsForUser.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 10 additions & 30 deletions src/lib/api/drips-subgraph/queries.ts
Original file line number Diff line number Diff line change
@@ -1,44 +1,24 @@
import { gql } from 'graphql-tag';

export const DRIPS_ENTRIES_FOR_CONFIG = gql`
query DripsEntriesForConfig($user: ID!) {
export const DRIPS_ACCOUNTS_FOR_USER = gql`
query DripsAccountsForUser($user: ID!) {
dripsConfig(id: $user) {
dripsEntries {
receiver
account
amtPerSec
dripsAccount {
isAccountDrip
id
account
}
}
}
`;

export const GET_LAST_DRIP_ENTRY = gql`
query LastDripsEntry($user: Bytes!) {
dripsEntries(
where: { user: $user, isAccountDrip: true }
orderBy: account
orderDirection: desc
first: 1
) {
account
export const DRIPS_ENTRIES_STREAMING_TO_USER = gql`
query DripsEntriesStreamingToUser($user: Bytes!) {
dripsEntries(where: { receiver: $user }) {
user
account
amtPerSec
isAccountDrip
receiver
}
}
`;

export const GET_DRIPS_ACCOUNT = gql`
query DripsAccount($id: ID!) {
dripsAccount(id: $id) {
id
lastUpdatedBlockTimestamp
dripsEntries {
receiver
amtPerSec
}
balance
}
}
`;
Expand Down
17 changes: 0 additions & 17 deletions src/lib/api/gnosis/index.ts

This file was deleted.

33 changes: 0 additions & 33 deletions src/lib/components/AwaitingSafeTransactionStep.svelte

This file was deleted.

14 changes: 5 additions & 9 deletions src/lib/components/BalanceButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,15 @@
import * as modal from '$lib/utils/modal';
import drips from '$lib/stores/drips';
import { currencyFormat, padFloatString } from '$lib/utils/format';
import { workstreamsStore } from '$lib/stores/workstreams';
import workstreamsStore from '$lib/stores/workstreams';
import LoadingDots from './LoadingDots.svelte';
import { goto } from '$app/navigation';
import StepperModal from '$lib/components/StepperModal/index.svelte';
import Intro from '$lib/components/WithdrawSteps/Intro.svelte';
import { walletStore } from '$lib/stores/wallet/wallet';
import AwaitingSafeTransactionStep from './AwaitingSafeTransactionStep.svelte';
const estimates = workstreamsStore.estimates;
$: currentCycleBalanceEstimate =
$estimates.earnedInCurrentCycle !== undefined &&
currencyFormat($estimates.earnedInCurrentCycle);
$workstreamsStore.earnedInCurrentCycle !== undefined &&
currencyFormat($workstreamsStore.earnedInCurrentCycle);
$: withdrawable =
$drips.collectable && currencyFormat($drips.collectable.wei);
Expand All @@ -30,7 +26,7 @@
currentCycleBalanceEstimate &&
currencyFormat(
($drips.collectable?.wei ?? BigInt(0)) +
($estimates.earnedInCurrentCycle?.wei ?? BigInt(0))
($workstreamsStore.earnedInCurrentCycle?.wei ?? BigInt(0))
);
$: formattedCycleEnd = $drips.cycle && {
Expand All @@ -48,7 +44,7 @@
async function collect() {
modal.show(StepperModal, undefined, {
steps: [Intro, $walletStore.safe?.ready && AwaitingSafeTransactionStep]
steps: [Intro]
});
}
Expand Down
6 changes: 2 additions & 4 deletions src/lib/components/Connect/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import LoadingDots from '../LoadingDots.svelte';
import StepperModal from '../StepperModal/index.svelte';
import ChooseWallet from './steps/ChooseWallet.svelte';
import LinkSafe from './steps/LinkSafe.svelte';
import clearStores from '$lib/stores/utils/clearStores';
import connectStores from '$lib/stores/utils/connectStores';
import isMobile from '$lib/stores/isMobile';
Expand All @@ -29,7 +28,7 @@
hover = false;
},
{
steps: [ChooseWallet, LinkSafe]
steps: [ChooseWallet]
}
);
}
Expand All @@ -38,8 +37,7 @@
await tick();
if ($walletStore.ready) {
const { provider: localProvider, safe } = $walletStore;
const provider = safe?.provider ?? localProvider;
const { provider } = $walletStore;
if (!provider) throw new Error('Unable to get provider');
Expand Down
128 changes: 0 additions & 128 deletions src/lib/components/Connect/steps/LinkSafe.svelte

This file was deleted.

Loading

0 comments on commit a749d6b

Please sign in to comment.