Skip to content

Commit

Permalink
feat: take out hardcoded dimensions and branch from workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Jeroen Branje <[email protected]>
  • Loading branch information
jeroenbranje committed Dec 3, 2024
1 parent d542ac5 commit 6f245af
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 40 deletions.
1 change: 0 additions & 1 deletion .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- develop
- 336_handle_data_from_asset
workflow_dispatch:

# Concurrency group name ensures concurrent workflow runs wait for any in-progress job to finish
Expand Down
28 changes: 0 additions & 28 deletions apps/envited.ascs.digital/common/asset/createTokenMetadata.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ describe('common/asset/createTokenMetadata', () => {
{
uri: 'ipfs://DISPLAY_URI_CID',
hash: 'DISPLAY_URI_CID',
mimeType: 'image/png',
dimensions: {
value: '1095x850',
unit: 'px',
},
fileSize: 512,
fileName: 'DISPLAY_URI',
},
Expand Down Expand Up @@ -89,8 +84,6 @@ describe('common/asset/createTokenMetadata', () => {
cid: 'DISPLAY_URI_CID',
uri: 'DISPLAY_URI',
fileSize: 512,
dimensions: '1095x850',
mimeType: 'image/png',
},
domainMetadata: {
cid: 'DOMAIN_METADATA_CID',
Expand Down Expand Up @@ -150,11 +143,6 @@ describe('common/asset/createTokenMetadata', () => {
{
uri: 'ipfs://DISPLAY_URI_CID',
hash: 'DISPLAY_URI_CID',
mimeType: 'image/png',
dimensions: {
value: '1095x850',
unit: 'px',
},
fileSize: 512,
fileName: 'DISPLAY_URI',
},
Expand Down Expand Up @@ -193,8 +181,6 @@ describe('common/asset/createTokenMetadata', () => {
cid: 'DISPLAY_URI_CID',
uri: 'DISPLAY_URI',
fileSize: 512,
dimensions: '1095x850',
mimeType: 'image/png',
},
domainMetadata: {
cid: 'DOMAIN_METADATA_CID',
Expand Down Expand Up @@ -254,11 +240,6 @@ describe('common/asset/createTokenMetadata', () => {
{
uri: 'ipfs://DISPLAY_URI_CID',
hash: 'DISPLAY_URI_CID',
mimeType: 'image/png',
dimensions: {
value: '1095x850',
unit: 'px',
},
fileSize: 512,
fileName: 'DISPLAY_URI',
},
Expand Down Expand Up @@ -297,8 +278,6 @@ describe('common/asset/createTokenMetadata', () => {
cid: 'DISPLAY_URI_CID',
uri: 'DISPLAY_URI',
fileSize: 512,
dimensions: '1095x850',
mimeType: 'image/png',
},
domainMetadata: {
cid: 'DOMAIN_METADATA_CID',
Expand Down Expand Up @@ -358,11 +337,6 @@ describe('common/asset/createTokenMetadata', () => {
{
uri: 'ipfs://DISPLAY_URI_CID',
hash: 'DISPLAY_URI_CID',
mimeType: 'image/png',
dimensions: {
value: '1095x850',
unit: 'px',
},
fileSize: 512,
fileName: 'DISPLAY_URI',
},
Expand Down Expand Up @@ -401,8 +375,6 @@ describe('common/asset/createTokenMetadata', () => {
cid: 'DISPLAY_URI_CID',
uri: 'DISPLAY_URI',
fileSize: 512,
dimensions: '1095x850',
mimeType: 'image/png',
},
domainMetadata: {
cid: 'DOMAIN_METADATA_CID',
Expand Down
5 changes: 0 additions & 5 deletions apps/envited.ascs.digital/common/asset/createTokenMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ export const createTokenMetadata = ({
{
uri: formatIpfsUri(display.cid),
hash: display.cid,
mimeType: 'image/png',
dimensions: {
value: '1095x850',
unit: 'px',
},
fileSize: display.fileSize,
fileName: extractFilenameFromPath(display.uri),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ describe('common/asset/validateAndCreateMetadata', () => {
const createMetadataStub = jest.fn().mockReturnValue('METADATA_BUFFER') as any
const createModifiedManifestStub = jest.fn().mockReturnValue('MODIFIED_MANIFEST_BUFFER') as any
const createFilenameStub = jest.fn().mockReturnValue('HASH') as any
const getImageDimensionsAndTypeStub = jest.fn().mockResolvedValue({
width: 1095,
height: 850,
type: 'image/png',
}) as any
const getAllFilenamesFromFilesStub = jest.fn().mockResolvedValue([
{
path: 'PATH',
Expand Down Expand Up @@ -74,7 +69,6 @@ describe('common/asset/validateAndCreateMetadata', () => {
createFilename: createFilenameStub,
getFilesAsPathAndByteArrayFromManifest: getFilesAsPathAndByteArrayFromManifestStub,
getAllFilenamesFromFiles: getAllFilenamesFromFilesStub,
// getImageDimensionsAndType: getImageDimensionsAndTypeStub,
db: dbStub,
})(byteArray as any, asset as any)

Expand Down

0 comments on commit 6f245af

Please sign in to comment.