Skip to content

Commit

Permalink
Merge pull request #2 from yadavnarun/main
Browse files Browse the repository at this point in the history
misc edits beta
  • Loading branch information
hxyro authored Apr 10, 2022
2 parents 45780a4 + 4604227 commit 044fb31
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 23 deletions.
1 change: 1 addition & 0 deletions app/.env_version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
frizzle_version=0.1.0-beta
2 changes: 1 addition & 1 deletion app/src/components/MsgForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const send = async () => {
:class="canMsg ? 'bg-green-500' : 'bg-green-300 cursor-not-allowed'"
@click="send"
>
Msg
Zfreez
</button>
</div>
</div>
Expand Down
50 changes: 28 additions & 22 deletions app/src/composables/useWorkspace.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
import { computed } from 'vue'
import { useAnchorWallet } from 'solana-wallets-vue'
import { Connection, PublicKey } from '@solana/web3.js'
import { Provider, Program } from '@project-serum/anchor'
import idl from '@/idl/solana_twitter.json'
import { computed } from "vue";
import { useAnchorWallet } from "solana-wallets-vue";
import { Connection, PublicKey } from "@solana/web3.js";
import { Provider, Program } from "@project-serum/anchor";
import idl from "@/idl/solana_frizzle.json";

const clusterUrl = process.env.VUE_APP_CLUSTER_URL
const preflightCommitment = 'processed'
const commitment = 'processed'
const programID = new PublicKey(idl.metadata.address)
let workspace = null
const clusterUrl = process.env.VUE_APP_CLUSTER_URL;
const preflightCommitment = "processed";
const commitment = "processed";
const programID = new PublicKey(idl.metadata.address);
let workspace = null;

export const useWorkspace = () => workspace
export const useWorkspace = () => workspace;

export const initWorkspace = () => {
const wallet = useAnchorWallet()
const connection = new Connection(clusterUrl, commitment)
const provider = computed(() => new Provider(connection, wallet.value, { preflightCommitment, commitment }))
const program = computed(() => new Program(idl, programID, provider.value))
const wallet = useAnchorWallet();
const connection = new Connection(clusterUrl, commitment);
const provider = computed(
() =>
new Provider(connection, wallet.value, {
preflightCommitment,
commitment,
})
);
const program = computed(() => new Program(idl, programID, provider.value));

workspace = {
wallet,
connection,
provider,
program,
}
}
workspace = {
wallet,
connection,
provider,
program,
};
};
File renamed without changes.

0 comments on commit 044fb31

Please sign in to comment.