Skip to content

Commit

Permalink
Merge branch 'main' into upgrade-file-system
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulyadav-57 committed Sep 16, 2024
2 parents 024c842 + 143f54a commit f7d064d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
9 changes: 7 additions & 2 deletions src/components/workspace/BuildProject/BuildProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { buildTs } from '@/utility/typescriptHelper';
import {
delay,
getFileExtension,
htmlToAnsi,
isIncludesTypeCellOrSlice,
tonHttpEndpoint,
} from '@/utility/utils';
Expand Down Expand Up @@ -287,7 +288,9 @@ const BuildProject: FC<Props> = ({ projectId, contract, updateContract }) => {
const wallet = await blockchain.treasury('user');
globalWorkspace.sandboxWallet = wallet;
createLog(
`Sandbox account created. Address: <i>${wallet.address.toString()}</i>`,
htmlToAnsi(
`Sandbox account created. Address: <i>${wallet.address.toString()}</i>`,
),
'info',
false,
);
Expand All @@ -309,7 +312,9 @@ const BuildProject: FC<Props> = ({ projectId, contract, updateContract }) => {
environment: environment.toLowerCase(),
});
createLog(
`Contract deployed on <b><i>${environment}</i></b> <br /> Contract address: ${_contractAddress}`,
htmlToAnsi(
`Contract deployed on <b><i>${environment}</i></b> <br /> Contract address: ${_contractAddress}`,
),
'success',
);

Expand Down
3 changes: 1 addition & 2 deletions src/hooks/logActivity.hooks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { LogEntry, LogType } from '@/interfaces/log.interface';
import { logState } from '@/state/log.state';
import EventEmitter from '@/utility/eventEmitter';
import { htmlToAnsi, isHTML } from '@/utility/utils';
import { useRecoilState } from 'recoil';

export function useLogActivity() {
Expand Down Expand Up @@ -40,7 +39,7 @@ export function useLogActivity() {
return;
}
const logEntry: LogEntry = {
text: isHTML(text.trim()) ? htmlToAnsi(text.trim()) : text,
text,
type,
timestamp: !disableTimestamp ? new Date().toISOString() : '',
};
Expand Down
2 changes: 0 additions & 2 deletions src/utility/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ export const htmlToAnsi = (html: string) => {
return html;
};

export const isHTML = RegExp.prototype.test.bind(/(<([^>]+)>)/i);

export const getFileNameFromPath = (filePath: string): string => {
const pathArray = filePath.split('/');

Expand Down

0 comments on commit f7d064d

Please sign in to comment.