What happened?
WalletConnect chia_takeOffer reuses the normal Show Offer Details preview flow from the GUI. That preview path assumes the backend get_offer_summary response is always a normal OfferSummaryRecord with fields like requested, offered, infos, and fees. For supported Data Layer offers, the backend intentionally returns a different summary shape through the same JSON summary field: a DataLayerSummary whose offered value is an array of singleton/root-transition entries and which does not contain requested, infos, or fees. The WalletConnect preview path does not handle that alternate shape. As a result, when a dApp sends a supported Data Layer offer through chia_takeOffer and the user clicks Show Offer Details, the modal fails with Cannot convert undefined or null to object. The user is then left with only the opaque bech32 offer string, even though the backend still accepts the same Data Layer offer type and can execute the associated singleton/store-root transition on approval.
Root Cause
On the BE:
/chia-blockchain/chia/wallet/wallet_request_types.py:713 defines GetOfferSummaryResponse with either summary: OfferSummary or data_layer_summary: DataLayerSummary
/chia-blockchain/chia/wallet/wallet_request_types.py:728-731 serialize data_layer_summary back into the JSON key summary
/chia-blockchain/chia/wallet/trade_manager.py:968-979 detect Data Layer offers and return DataLayerWallet.get_offer_summary(offer)
/chia-blockchain/chia/data_layer/data_layer_wallet.py:95-99 define DataLayerSummary as offered: list[SingletonSummary]
On the FE:
/chia-blockchain-gui/packages/api/src/services/WalletService.ts:271 types getOfferSummary() as returning { id: string; summary: OfferSummaryRecord }
/chia-blockchain-gui/packages/api/src/@types/OfferSummaryRecord.ts assumes requested, offered, infos, fees, and validTimes
/chia-blockchain-gui/packages/gui/src/components/walletConnect/WalletConnectOfferPreview.tsx:20 opens OfferBuilderViewerDialog
/chia-blockchain-gui/packages/gui/src/components/offers2/OfferBuilderViewerDialog.tsx:28 fetches getOfferSummary({ offerData: offer })
/chia-blockchain-gui/packages/gui/src/components/offers2/OfferBuilderViewer.tsx:149 passes the parsed object into offerToOfferBuilderData()
/chia-blockchain-gui/packages/gui/src/util/offerToOfferBuilderData.ts:14 destructures fees, offered, requested, infos
7/ /chia-blockchain-gui/packages/gui/src/util/offerToOfferBuilderData.ts:28 immediately does Object.keys(requested)
Version
2.5.4-rc1
What platform are you using?
Linux
What ui mode are you using?
GUI
What happened?
WalletConnect
chia_takeOfferreuses the normalShow Offer Detailspreview flow from the GUI. That preview path assumes the backendget_offer_summaryresponse is always a normalOfferSummaryRecordwith fields likerequested,offered,infos, andfees. For supported Data Layer offers, the backend intentionally returns a different summary shape through the same JSON summary field: aDataLayerSummarywhose offered value is an array of singleton/root-transition entries and which does not containrequested,infos, orfees. The WalletConnect preview path does not handle that alternate shape. As a result, when a dApp sends a supported Data Layer offer throughchia_takeOfferand the user clicksShow Offer Details, the modal fails withCannot convert undefined or null to object. The user is then left with only the opaque bech32 offer string, even though the backend still accepts the same Data Layer offer type and can execute the associated singleton/store-root transition on approval.Root Cause
On the BE:
/chia-blockchain/chia/wallet/wallet_request_types.py:713definesGetOfferSummaryResponsewith either summary:OfferSummaryordata_layer_summary: DataLayerSummary/chia-blockchain/chia/wallet/wallet_request_types.py:728-731serializedata_layer_summaryback into the JSON key summary/chia-blockchain/chia/wallet/trade_manager.py:968-979detect Data Layer offers and returnDataLayerWallet.get_offer_summary(offer)/chia-blockchain/chia/data_layer/data_layer_wallet.py:95-99defineDataLayerSummaryas offered:list[SingletonSummary]On the FE:
/chia-blockchain-gui/packages/api/src/services/WalletService.ts:271 types getOfferSummary()as returning{ id: string; summary: OfferSummaryRecord }/chia-blockchain-gui/packages/api/src/@types/OfferSummaryRecord.tsassumes requested, offered, infos, fees, and validTimes/chia-blockchain-gui/packages/gui/src/components/walletConnect/WalletConnectOfferPreview.tsx:20opensOfferBuilderViewerDialog/chia-blockchain-gui/packages/gui/src/components/offers2/OfferBuilderViewerDialog.tsx:28fetchesgetOfferSummary({ offerData: offer })/chia-blockchain-gui/packages/gui/src/components/offers2/OfferBuilderViewer.tsx:149passes the parsed object intoofferToOfferBuilderData()/chia-blockchain-gui/packages/gui/src/util/offerToOfferBuilderData.ts:14destructures fees, offered, requested, infos7/
/chia-blockchain-gui/packages/gui/src/util/offerToOfferBuilderData.ts:28immediately doesObject.keys(requested)Version
2.5.4-rc1
What platform are you using?
Linux
What ui mode are you using?
GUI