Skip to content

Commit

Permalink
feat: add christmas bg card and fix issue button (#14)
Browse files Browse the repository at this point in the history
release-as: 0.12.0
  • Loading branch information
zzcwoshizz authored Feb 2, 2023
1 parent 3e3ea8d commit 935eddf
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
"test": "zcloak-dev-run-test --coverage --forceExit --runInBand --testPathIgnorePatterns e2e",
"test:one": "zcloak-dev-run-test --detectOpenHandles --forceExit"
},
"dependencies": {
"bip39": "^3.0.4"
},
"devDependencies": {
"@babel/core": "^7.20.5",
"@babel/register": "^7.18.9",
Expand Down
16 changes: 15 additions & 1 deletion packages/app-config/src/ctypes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,21 @@ export const ctypeMeta: Record<HexString, CTypeMeta> = {
'0x9884edce63d4de703c4b3ebf23063929705b7139ce2eeb3b6631c2fa25deb74f': {
type: 'all',
card: 'christmas2022/bac_card1.webp'
},
'0x28b5f594de884efe23886d1ade88a48db1670644664780364a7e6a6c55ee5c63': {
type: 'all',
card: 'christmas2022/bac_card3.webp'
},
'0x15ea88be73bd78986a41141fc86497f0cfef4a0d1b5463d100758edca37c546b': {
type: 'all',
card: 'christmas2022/bac_card2.webp'
}
};

export const TOP_CTYPES_FOR_ISSUE: HexString[] = isRelease
? [
'0x28b5f594de884efe23886d1ade88a48db1670644664780364a7e6a6c55ee5c63',
'0x15ea88be73bd78986a41141fc86497f0cfef4a0d1b5463d100758edca37c546b',
'0x9884edce63d4de703c4b3ebf23063929705b7139ce2eeb3b6631c2fa25deb74f',
'0x4394e5a3f6d7e18957d02095d46e37558e2502bce59aacd407b074781d7d6b5b'
]
Expand All @@ -37,7 +47,11 @@ export const TOP_CTYPES_FOR_ISSUE: HexString[] = isRelease
];

export const TOP_CTYPES_FOR_ATTEST: HexString[] = isRelease
? ['0x9884edce63d4de703c4b3ebf23063929705b7139ce2eeb3b6631c2fa25deb74f']
? [
'0x28b5f594de884efe23886d1ade88a48db1670644664780364a7e6a6c55ee5c63',
'0x15ea88be73bd78986a41141fc86497f0cfef4a0d1b5463d100758edca37c546b',
'0x9884edce63d4de703c4b3ebf23063929705b7139ce2eeb3b6631c2fa25deb74f'
]
: [];

export function getCTypeMetaForIssue(id: HexString): CTypeMeta | undefined {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/Notification/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function Cell({
</Stack>
{!isRead && (
<Button onClick={onRead} size="small">
Mask as read
Mark as read
</Button>
)}
<Button onClick={handleClick} size="small">
Expand Down
3 changes: 1 addition & 2 deletions packages/page-claims/src/CredentialCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { isMobile } from '@credential/react-hooks/utils/userAgent';
import DownloadButton from './button/DownloadButton';
import ImportButton from './button/ImportButton';
import QrcodeButton from './button/QrcodeButton';
import RetweetButton from './button/RetweetButton';
import ShareButton from './button/ShareButton';

const Wrapper = styled(Paper)(({ theme }) => ({
Expand Down Expand Up @@ -194,7 +193,7 @@ function CredentialCell({ credential, issuer, rootHash, status, time }: Credenti
<ImportButton credential={vc} />
<ShareButton credential={vc} />
<DownloadButton credential={vc} />
<RetweetButton credential={vc} />
{/* <RetweetButton credential={vc} /> */}
<QrcodeButton credential={vc} />
</Stack>
)}
Expand Down
6 changes: 4 additions & 2 deletions packages/page-issue/src/SubmitVC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ function SubmitVC({ contents, ctype, holder, onDone }: Props) {
const [vc, setVC] = useState<VerifiableCredential | null>(null);

const _toggleOpen = useCallback(() => {
if (!holder) return;

try {
const raw = new Raw({
contents,
owner: sender.id,
owner: holder.id,
ctype,
hashType: DEFAULT_ROOT_HASH_TYPE
});
Expand All @@ -57,7 +59,7 @@ function SubmitVC({ contents, ctype, holder, onDone }: Props) {
} catch (error) {
notifyError(error);
}
}, [contents, ctype, notifyError, sender, toggleOpen]);
}, [contents, ctype, holder, notifyError, toggleOpen]);

const _onDone = useCallback(() => {
onDone?.();
Expand Down
1 change: 0 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15064,7 +15064,6 @@ __metadata:
"@types/react-dom": ^18.0.9
"@types/ua-parser-js": ^0.7.36
"@zcloak/dev": ^0.12.0
bip39: ^3.0.4
concurrently: ^7.6.0
devtron: ^1.4.0
humps: ^2.0.1
Expand Down

0 comments on commit 935eddf

Please sign in to comment.