Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Telescope to v1.8.3 #1793

Merged
merged 16 commits into from
Jul 30, 2024
Merged
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export type UploadCodeData = {
// Whether or not data is gzipped.
gzipped?: boolean
accessType: AccessType
// Only used when accessType === AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES
// Only used when accessType === AccessType.AnyOfAddresses
allowedAddresses: {
address: string
}[]
Expand Down Expand Up @@ -191,15 +191,15 @@ export const UploadCodeComponent: ActionComponent<UploadCodeOptions> = ({
[
{
label: t('info.anyone'),
value: AccessType.ACCESS_TYPE_EVERYBODY,
value: AccessType.Everybody,
},
{
label: t('form.noOne'),
value: AccessType.ACCESS_TYPE_NOBODY,
value: AccessType.Nobody,
},
{
label: t('form.oneOrMoreAccounts'),
value: AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES,
value: AccessType.AnyOfAddresses,
},
] as RadioInputOption<AccessType>[]
)
Expand All @@ -209,7 +209,7 @@ export const UploadCodeComponent: ActionComponent<UploadCodeOptions> = ({
watch={watch}
/>

{accessType === AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES && (
{accessType === AccessType.AnyOfAddresses && (
<div className={clsx('flex flex-col', isCreating && 'gap-2')}>
{allowedAddressesFields.map(({ id }, index) => (
<div key={id} className="flex flex-row items-center gap-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const makeUploadCodeAction: ActionMaker<UploadCodeData> = (options) => {

const useDefaults: UseDefaults<UploadCodeData> = () => ({
chainId: currentChainId,
accessType: AccessType.ACCESS_TYPE_EVERYBODY,
accessType: AccessType.Everybody,
allowedAddresses: [{ address }],
})

Expand Down Expand Up @@ -93,7 +93,7 @@ export const makeUploadCodeAction: ActionMaker<UploadCodeData> = (options) => {
instantiatePermission: {
permission: accessType,
addresses:
accessType === AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES
accessType === AccessType.AnyOfAddresses
? allowedAddresses.map(({ address }) => address)
: [],
},
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"devDependencies": {
"@cosmjs/cosmwasm-stargate": "^0.32.3",
"@cosmology/telescope": "^1.4.12",
"@cosmology/telescope": "^1.8.3",
"@dao-dao/config": "2.4.2-rc.1",
"@tanstack/react-query": "^5.40.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const GenesisState = {
if (message.collections) {
obj.collections = message.collections.map(e => e ? Collection.toAmino(e, useInterfaces) : undefined);
} else {
obj.collections = [];
obj.collections = message.collections;
}
obj.params = message.params ? Params.toAmino(message.params, useInterfaces) : undefined;
return obj;
Expand Down
92 changes: 46 additions & 46 deletions packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/onft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ export const Collection = {
if (message.onfts) {
obj.onfts = message.onfts.map(e => e ? ONFT.toAmino(e, useInterfaces) : undefined);
} else {
obj.onfts = [];
obj.onfts = message.onfts;
}
return obj;
},
Expand Down Expand Up @@ -414,11 +414,11 @@ export const IDCollection = {
},
toAmino(message: IDCollection, useInterfaces: boolean = false): IDCollectionAmino {
const obj: any = {};
obj.denom_id = message.denomId;
obj.denom_id = message.denomId === "" ? undefined : message.denomId;
if (message.onftIds) {
obj.onft_ids = message.onftIds.map(e => e);
} else {
obj.onft_ids = [];
obj.onft_ids = message.onftIds;
}
return obj;
},
Expand Down Expand Up @@ -590,20 +590,20 @@ export const Denom = {
},
toAmino(message: Denom, useInterfaces: boolean = false): DenomAmino {
const obj: any = {};
obj.id = message.id;
obj.symbol = message.symbol;
obj.name = message.name;
obj.schema = message.schema;
obj.creator = message.creator;
obj.description = message.description;
obj.preview_uri = message.previewUri;
obj.uri = message.uri;
obj.uri_hash = message.uriHash;
obj.data = message.data;
obj.id = message.id === "" ? undefined : message.id;
obj.symbol = message.symbol === "" ? undefined : message.symbol;
obj.name = message.name === "" ? undefined : message.name;
obj.schema = message.schema === "" ? undefined : message.schema;
obj.creator = message.creator === "" ? undefined : message.creator;
obj.description = message.description === "" ? undefined : message.description;
obj.preview_uri = message.previewUri === "" ? undefined : message.previewUri;
obj.uri = message.uri === "" ? undefined : message.uri;
obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash;
obj.data = message.data === "" ? undefined : message.data;
if (message.royaltyReceivers) {
obj.royalty_receivers = message.royaltyReceivers.map(e => e ? WeightedAddress.toAmino(e, useInterfaces) : undefined);
} else {
obj.royalty_receivers = [];
obj.royalty_receivers = message.royaltyReceivers;
}
return obj;
},
Expand Down Expand Up @@ -731,16 +731,16 @@ export const DenomMetadata = {
},
toAmino(message: DenomMetadata, useInterfaces: boolean = false): DenomMetadataAmino {
const obj: any = {};
obj.creator = message.creator;
obj.schema = message.schema;
obj.description = message.description;
obj.preview_uri = message.previewUri;
obj.data = message.data;
obj.uri_hash = message.uriHash;
obj.creator = message.creator === "" ? undefined : message.creator;
obj.schema = message.schema === "" ? undefined : message.schema;
obj.description = message.description === "" ? undefined : message.description;
obj.preview_uri = message.previewUri === "" ? undefined : message.previewUri;
obj.data = message.data === "" ? undefined : message.data;
obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash;
if (message.royaltyReceivers) {
obj.royalty_receivers = message.royaltyReceivers.map(e => e ? WeightedAddress.toAmino(e, useInterfaces) : undefined);
} else {
obj.royalty_receivers = [];
obj.royalty_receivers = message.royaltyReceivers;
}
return obj;
},
Expand Down Expand Up @@ -892,15 +892,15 @@ export const ONFT = {
},
toAmino(message: ONFT, useInterfaces: boolean = false): ONFTAmino {
const obj: any = {};
obj.id = message.id;
obj.id = message.id === "" ? undefined : message.id;
obj.metadata = message.metadata ? Metadata.toAmino(message.metadata, useInterfaces) : undefined;
obj.data = message.data;
obj.owner = message.owner;
obj.transferable = message.transferable;
obj.extensible = message.extensible;
obj.data = message.data === "" ? undefined : message.data;
obj.owner = message.owner === "" ? undefined : message.owner;
obj.transferable = message.transferable === false ? undefined : message.transferable;
obj.extensible = message.extensible === false ? undefined : message.extensible;
obj.created_at = message.createdAt ? Timestamp.toAmino(toTimestamp(message.createdAt)) : undefined;
obj.nsfw = message.nsfw;
obj.royalty_share = message.royaltyShare;
obj.nsfw = message.nsfw === false ? undefined : message.nsfw;
obj.royalty_share = message.royaltyShare === "" ? undefined : message.royaltyShare;
return obj;
},
fromAminoMsg(object: ONFTAminoMsg): ONFT {
Expand Down Expand Up @@ -1007,11 +1007,11 @@ export const Metadata = {
},
toAmino(message: Metadata, useInterfaces: boolean = false): MetadataAmino {
const obj: any = {};
obj.name = message.name;
obj.description = message.description;
obj.media_uri = message.mediaUri;
obj.preview_uri = message.previewUri;
obj.uri_hash = message.uriHash;
obj.name = message.name === "" ? undefined : message.name;
obj.description = message.description === "" ? undefined : message.description;
obj.media_uri = message.mediaUri === "" ? undefined : message.mediaUri;
obj.preview_uri = message.previewUri === "" ? undefined : message.previewUri;
obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash;
return obj;
},
fromAminoMsg(object: MetadataAminoMsg): Metadata {
Expand Down Expand Up @@ -1173,16 +1173,16 @@ export const ONFTMetadata = {
},
toAmino(message: ONFTMetadata, useInterfaces: boolean = false): ONFTMetadataAmino {
const obj: any = {};
obj.name = message.name;
obj.description = message.description;
obj.preview_uri = message.previewUri;
obj.data = message.data;
obj.transferable = message.transferable;
obj.extensible = message.extensible;
obj.name = message.name === "" ? undefined : message.name;
obj.description = message.description === "" ? undefined : message.description;
obj.preview_uri = message.previewUri === "" ? undefined : message.previewUri;
obj.data = message.data === "" ? undefined : message.data;
obj.transferable = message.transferable === false ? undefined : message.transferable;
obj.extensible = message.extensible === false ? undefined : message.extensible;
obj.created_at = message.createdAt ? Timestamp.toAmino(toTimestamp(message.createdAt)) : undefined;
obj.nsfw = message.nsfw;
obj.royalty_share = message.royaltyShare;
obj.uri_hash = message.uriHash;
obj.nsfw = message.nsfw === false ? undefined : message.nsfw;
obj.royalty_share = message.royaltyShare === "" ? undefined : message.royaltyShare;
obj.uri_hash = message.uriHash === "" ? undefined : message.uriHash;
return obj;
},
fromAminoMsg(object: ONFTMetadataAminoMsg): ONFTMetadata {
Expand Down Expand Up @@ -1254,11 +1254,11 @@ export const Owner = {
},
toAmino(message: Owner, useInterfaces: boolean = false): OwnerAmino {
const obj: any = {};
obj.address = message.address;
obj.address = message.address === "" ? undefined : message.address;
if (message.idCollections) {
obj.id_collections = message.idCollections.map(e => e ? IDCollection.toAmino(e, useInterfaces) : undefined);
} else {
obj.id_collections = [];
obj.id_collections = message.idCollections;
}
return obj;
},
Expand Down Expand Up @@ -1333,8 +1333,8 @@ export const WeightedAddress = {
},
toAmino(message: WeightedAddress, useInterfaces: boolean = false): WeightedAddressAmino {
const obj: any = {};
obj.address = message.address;
obj.weight = message.weight;
obj.address = message.address === "" ? undefined : message.address;
obj.weight = message.weight === "" ? undefined : message.weight;
return obj;
},
fromAminoMsg(object: WeightedAddressAminoMsg): WeightedAddress {
Expand Down
40 changes: 20 additions & 20 deletions packages/types/protobuf/codegen/OmniFlix/onft/v1beta1/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export const QueryCollectionRequest = {
},
toAmino(message: QueryCollectionRequest, useInterfaces: boolean = false): QueryCollectionRequestAmino {
const obj: any = {};
obj.denom_id = message.denomId;
obj.denom_id = message.denomId === "" ? undefined : message.denomId;
obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined;
return obj;
},
Expand Down Expand Up @@ -597,7 +597,7 @@ export const QueryIBCCollectionRequest = {
},
toAmino(message: QueryIBCCollectionRequest, useInterfaces: boolean = false): QueryIBCCollectionRequestAmino {
const obj: any = {};
obj.hash = message.hash;
obj.hash = message.hash === "" ? undefined : message.hash;
obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined;
return obj;
},
Expand Down Expand Up @@ -661,7 +661,7 @@ export const QueryDenomRequest = {
},
toAmino(message: QueryDenomRequest, useInterfaces: boolean = false): QueryDenomRequestAmino {
const obj: any = {};
obj.denom_id = message.denomId;
obj.denom_id = message.denomId === "" ? undefined : message.denomId;
return obj;
},
fromAminoMsg(object: QueryDenomRequestAminoMsg): QueryDenomRequest {
Expand Down Expand Up @@ -787,7 +787,7 @@ export const QueryIBCDenomRequest = {
},
toAmino(message: QueryIBCDenomRequest, useInterfaces: boolean = false): QueryIBCDenomRequestAmino {
const obj: any = {};
obj.hash = message.hash;
obj.hash = message.hash === "" ? undefined : message.hash;
return obj;
},
fromAminoMsg(object: QueryIBCDenomRequestAminoMsg): QueryIBCDenomRequest {
Expand Down Expand Up @@ -862,7 +862,7 @@ export const QueryDenomsRequest = {
toAmino(message: QueryDenomsRequest, useInterfaces: boolean = false): QueryDenomsRequestAmino {
const obj: any = {};
obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined;
obj.owner = message.owner;
obj.owner = message.owner === "" ? undefined : message.owner;
return obj;
},
fromAminoMsg(object: QueryDenomsRequestAminoMsg): QueryDenomsRequest {
Expand Down Expand Up @@ -937,7 +937,7 @@ export const QueryDenomsResponse = {
if (message.denoms) {
obj.denoms = message.denoms.map(e => e ? Denom.toAmino(e, useInterfaces) : undefined);
} else {
obj.denoms = [];
obj.denoms = message.denoms;
}
obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination, useInterfaces) : undefined;
return obj;
Expand Down Expand Up @@ -1013,8 +1013,8 @@ export const QueryONFTRequest = {
},
toAmino(message: QueryONFTRequest, useInterfaces: boolean = false): QueryONFTRequestAmino {
const obj: any = {};
obj.denom_id = message.denomId;
obj.id = message.id;
obj.denom_id = message.denomId === "" ? undefined : message.denomId;
obj.id = message.id === "" ? undefined : message.id;
return obj;
},
fromAminoMsg(object: QueryONFTRequestAminoMsg): QueryONFTRequest {
Expand Down Expand Up @@ -1151,8 +1151,8 @@ export const QueryIBCDenomONFTRequest = {
},
toAmino(message: QueryIBCDenomONFTRequest, useInterfaces: boolean = false): QueryIBCDenomONFTRequestAmino {
const obj: any = {};
obj.hash = message.hash;
obj.id = message.id;
obj.hash = message.hash === "" ? undefined : message.hash;
obj.id = message.id === "" ? undefined : message.id;
return obj;
},
fromAminoMsg(object: QueryIBCDenomONFTRequestAminoMsg): QueryIBCDenomONFTRequest {
Expand Down Expand Up @@ -1237,8 +1237,8 @@ export const QueryOwnerONFTsRequest = {
},
toAmino(message: QueryOwnerONFTsRequest, useInterfaces: boolean = false): QueryOwnerONFTsRequestAmino {
const obj: any = {};
obj.denom_id = message.denomId;
obj.owner = message.owner;
obj.denom_id = message.denomId === "" ? undefined : message.denomId;
obj.owner = message.owner === "" ? undefined : message.owner;
obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined;
return obj;
},
Expand Down Expand Up @@ -1399,8 +1399,8 @@ export const QueryOwnerIBCDenomONFTsRequest = {
},
toAmino(message: QueryOwnerIBCDenomONFTsRequest, useInterfaces: boolean = false): QueryOwnerIBCDenomONFTsRequestAmino {
const obj: any = {};
obj.hash = message.hash;
obj.owner = message.owner;
obj.hash = message.hash === "" ? undefined : message.hash;
obj.owner = message.owner === "" ? undefined : message.owner;
obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination, useInterfaces) : undefined;
return obj;
},
Expand Down Expand Up @@ -1475,8 +1475,8 @@ export const QuerySupplyRequest = {
},
toAmino(message: QuerySupplyRequest, useInterfaces: boolean = false): QuerySupplyRequestAmino {
const obj: any = {};
obj.denom_id = message.denomId;
obj.owner = message.owner;
obj.denom_id = message.denomId === "" ? undefined : message.denomId;
obj.owner = message.owner === "" ? undefined : message.owner;
return obj;
},
fromAminoMsg(object: QuerySupplyRequestAminoMsg): QuerySupplyRequest {
Expand Down Expand Up @@ -1539,7 +1539,7 @@ export const QuerySupplyResponse = {
},
toAmino(message: QuerySupplyResponse, useInterfaces: boolean = false): QuerySupplyResponseAmino {
const obj: any = {};
obj.amount = message.amount ? message.amount.toString() : undefined;
obj.amount = message.amount !== BigInt(0) ? message.amount.toString() : undefined;
return obj;
},
fromAminoMsg(object: QuerySupplyResponseAminoMsg): QuerySupplyResponse {
Expand Down Expand Up @@ -1613,8 +1613,8 @@ export const QueryIBCDenomSupplyRequest = {
},
toAmino(message: QueryIBCDenomSupplyRequest, useInterfaces: boolean = false): QueryIBCDenomSupplyRequestAmino {
const obj: any = {};
obj.hash = message.hash;
obj.owner = message.owner;
obj.hash = message.hash === "" ? undefined : message.hash;
obj.owner = message.owner === "" ? undefined : message.owner;
return obj;
},
fromAminoMsg(object: QueryIBCDenomSupplyRequestAminoMsg): QueryIBCDenomSupplyRequest {
Expand Down Expand Up @@ -1690,7 +1690,7 @@ export const OwnerONFTCollection = {
if (message.onfts) {
obj.onfts = message.onfts.map(e => e ? ONFT.toAmino(e, useInterfaces) : undefined);
} else {
obj.onfts = [];
obj.onfts = message.onfts;
}
return obj;
},
Expand Down
Loading
Loading