Skip to content
Snippets Groups Projects
Commit d86de5dc authored by Nawfel Senoussi's avatar Nawfel Senoussi
Browse files

split feature into more specific folder

parent 4f2fdf31
No related branches found
No related tags found
No related merge requests found
import { type TezosToolkit } from '@taquito/taquito'
import chalk from 'chalk'
import { handleCreateAssociation } from '../handlers/association/associationHandlers.js'
import { handleCreateAssociation } from '../../handlers/association/associationHandlers.js'
async function createAssociation (tezos: TezosToolkit): Promise<void> {
await handleCreateAssociation(tezos).then(() => {
......
import { type TezosToolkit } from '@taquito/taquito'
import chalk from 'chalk'
import { handleGetAssociations, handleJoinAssociation } from '../handlers/association/associationHandlers.js'
import { handleGetAssociations, handleJoinAssociation } from '../../handlers/association/associationHandlers.js'
async function joinAssociation (tezos: TezosToolkit): Promise<void> {
await handleGetAssociations(tezos).then(async (response) => {
......
import { type TezosToolkit } from '@taquito/taquito'
import chalk from 'chalk'
import { handleGetAssociationDetails, handleGetAssociations } from '../handlers/association/associationHandlers.js'
import { handleGetAssociationDetails, handleGetAssociations } from '../../handlers/association/associationHandlers.js'
async function showAssociationDetails (tezos: TezosToolkit): Promise<void> {
await handleGetAssociations(tezos).then(async (response) => {
......
import { type TezosToolkit } from '@taquito/taquito'
import chalk from 'chalk'
import { handleGetAssociations } from '../handlers/association/associationHandlers.js'
import { handleGetAssociations } from '../../handlers/association/associationHandlers.js'
async function showAssociations (tezos: TezosToolkit): Promise<void> {
await handleGetAssociations(tezos).then((response) => {
......
import { type TezosToolkit } from '@taquito/taquito'
import chalk from 'chalk'
import { handleGetBalance } from '../handlers/balance/balanceHandlers.js'
import { handleGetBalance } from '../../handlers/balance/balanceHandlers.js'
async function showBalance (tezos: TezosToolkit): Promise<void> {
await handleGetBalance(tezos).then((response) => {
......
import { type TezosToolkit } from '@taquito/taquito'
import chalk from 'chalk'
import { handleCreateProposal } from '../handlers/proposal/proposalHandlers.js'
import { handleCreateProposal } from '../../handlers/proposal/proposalHandlers.js'
async function createProposal (tezos: TezosToolkit): Promise<void> {
await handleCreateProposal(tezos).then(() => {
......
import { type TezosToolkit } from '@taquito/taquito'
import chalk from 'chalk'
import { handleBurnToken } from '../handlers/token/tokenHandlers.js'
import { handleBurnToken } from '../../handlers/token/tokenHandlers.js'
async function burnToken (tezos: TezosToolkit): Promise<void> {
await handleBurnToken(tezos).then(() => {
......
import { type TezosToolkit } from '@taquito/taquito'
import chalk from 'chalk'
import { handleCreateToken } from '../handlers/token/tokenHandlers.js'
import { handleCreateToken } from '../../handlers/token/tokenHandlers.js'
async function createToken (tezos: TezosToolkit): Promise<void> {
await handleCreateToken(tezos).then(() => {
......
import { type TezosToolkit } from '@taquito/taquito'
import chalk from 'chalk'
import { showAssociations } from '../features/showAssociations.js'
import { showAssociationDetails } from '../features/showAssociationDetails.js'
import { showBalance } from '../features/showBalance.js'
import { joinAssociation } from '../features/joinAssociation.js'
import { createAssociation } from '../features/createAssociation.js'
import { burnToken } from '../features/burnToken.js'
import { createToken } from '../features/createToken.js'
import { createProposal } from '../features/createProposal.js'
import { showAssociations } from '../features/association/showAssociations.js'
import { showAssociationDetails } from '../features/association/showAssociationDetails.js'
import { showBalance } from '../features/balance/showBalance.js'
import { joinAssociation } from '../features/association/joinAssociation.js'
import { createAssociation } from '../features/association/createAssociation.js'
import { burnToken } from '../features/token/burnToken.js'
import { createToken } from '../features/token/createToken.js'
import { createProposal } from '../features/proposal/createProposal.js'
/**
* Handles fa token administrator actions based on the specified choice.
......
......@@ -9,5 +9,5 @@ export function getRole (tezos: TezosToolkit): Role {
// ELSE -> CONNECTED
// TEMPORARY
return 'ADHERENT'
return 'ADMIN_FA_TOKEN'
}
......@@ -2,43 +2,43 @@ import { type TezosToolkit } from '@taquito/taquito'
import { handleAdminFATokenChoice, handleAdminAssociationChoice, handleAdherentChoice, handleConnectedChoice } from '../../src/handlers/roleHandlers'
import { vi, describe, it, expect, beforeEach } from 'vitest'
import chalk from 'chalk'
import { createAssociation } from '../../src/features/createAssociation'
import { burnToken } from '../../src/features/burnToken'
import { createToken } from '../../src/features/createToken'
import { showBalance } from '../../src/features/showBalance'
import { createProposal } from '../../src/features/createProposal'
import { joinAssociation } from '../../src/features/joinAssociation'
import { showAssociations } from '../../src/features/showAssociations'
vi.mock('../../src/features/createAssociation', () => ({
import { createAssociation } from '../../src/features/association/createAssociation'
import { burnToken } from '../../src/features/token/burnToken'
import { createToken } from '../../src/features/token/createToken'
import { showBalance } from '../../src/features/balance/showBalance'
import { createProposal } from '../../src/features/proposal/createProposal'
import { joinAssociation } from '../../src/features/association/joinAssociation'
import { showAssociations } from '../../src/features/association/showAssociations'
vi.mock('../../src/features/association/createAssociation', () => ({
createAssociation: vi.fn()
}))
vi.mock('../../src/features/burnToken', () => ({
vi.mock('../../src/features/token/burnToken', () => ({
burnToken: vi.fn()
}))
vi.mock('../../src/features/createProposal', () => ({
vi.mock('../../src/features/proposal/createProposal', () => ({
createProposal: vi.fn()
}))
vi.mock('../../src/features/createToken', () => ({
vi.mock('../../src/features/token/createToken', () => ({
createToken: vi.fn()
}))
vi.mock('../../src/features/joinAssociation', () => ({
vi.mock('../../src/features/association/joinAssociation', () => ({
joinAssociation: vi.fn()
}))
vi.mock('../../src/features/showAssociationDetails', () => ({
vi.mock('../../src/features/association/showAssociationDetails', () => ({
showAssociationDetails: vi.fn()
}))
vi.mock('../../src/features/showAssociations', () => ({
vi.mock('../../src/features/association/showAssociations', () => ({
showAssociations: vi.fn()
}))
vi.mock('../../src/features/showBalance', () => ({
vi.mock('../../src/features/balance/showBalance', () => ({
showBalance: vi.fn()
}))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment